Built motion from commit (unavailable).|2.4.18
[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 _0xadd1=['hasOwnProperty','hook','exports','../../mysqldb','VoiceExtension','setMaxListeners','update','remove','emit'];(function(_0x1004a4,_0x3fcc17){var _0x27cbd0=function(_0x10dfbd){while(--_0x10dfbd){_0x1004a4['push'](_0x1004a4['shift']());}};_0x27cbd0(++_0x3fcc17);}(_0xadd1,0x198));var _0x1add=function(_0x58bec5,_0x301341){_0x58bec5=_0x58bec5-0x0;var _0xb9a75d=_0xadd1[_0x58bec5];return _0xb9a75d;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x1add('0x0'))['db'][_0x1add('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x1add('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1add('0x3'),'afterDestroy':_0x1add('0x4')};function emitEvent(_0x371193){return function(_0x29a662,_0x43dbe8,_0x526482){VoiceExtensionEvents[_0x1add('0x5')](_0x371193+':'+_0x29a662['id'],_0x29a662);VoiceExtensionEvents[_0x1add('0x5')](_0x371193,_0x29a662);_0x526482(null);};}for(var e in events){if(events[_0x1add('0x6')](e)){var event=events[e];VoiceExtension[_0x1add('0x7')](e,emitEvent(event));}}module[_0x1add('0x8')]=VoiceExtensionEvents;