Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / voiceExtension / voiceExtension.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x212f=['update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceExtension','setMaxListeners','save'];(function(_0x100918,_0x224f2f){var _0x11baa4=function(_0xfcc4a7){while(--_0xfcc4a7){_0x100918['push'](_0x100918['shift']());}};_0x11baa4(++_0x224f2f);}(_0x212f,0x1e5));var _0xf212=function(_0x1100cf,_0x3a6dce){_0x1100cf=_0x1100cf-0x0;var _0x51d764=_0x212f[_0x1100cf];return _0x51d764;};'use strict';var EventEmitter=require(_0xf212('0x0'));var VoiceExtension=require(_0xf212('0x1'))['db'][_0xf212('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xf212('0x3')](0x0);var events={'afterCreate':_0xf212('0x4'),'afterUpdate':_0xf212('0x5'),'afterDestroy':'remove'};function emitEvent(_0xa1e219){return function(_0x58c7f7,_0x589851,_0x58251d){VoiceExtensionEvents['emit'](_0xa1e219+':'+_0x58c7f7['id'],_0x58c7f7);VoiceExtensionEvents[_0xf212('0x6')](_0xa1e219,_0x58c7f7);_0x58251d(null);};}for(var e in events){if(events[_0xf212('0x7')](e)){var event=events[e];VoiceExtension[_0xf212('0x8')](e,emitEvent(event));}}module[_0xf212('0x9')]=VoiceExtensionEvents;