Built motion from commit (unavailable).|2.5.22
[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 _0x5ca2=['exports','../../mysqldb','VoiceExtension','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x17792a,_0x41df2f){var _0xe7344=function(_0x3554d9){while(--_0x3554d9){_0x17792a['push'](_0x17792a['shift']());}};_0xe7344(++_0x41df2f);}(_0x5ca2,0xc7));var _0x25ca=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x5ca2[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x25ca('0x0'))['db'][_0x25ca('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x25ca('0x2')](0x0);var events={'afterCreate':_0x25ca('0x3'),'afterUpdate':'update','afterDestroy':_0x25ca('0x4')};function emitEvent(_0x29d6e3){return function(_0x9e3529,_0xa35a23,_0x2759c9){VoiceExtensionEvents[_0x25ca('0x5')](_0x29d6e3+':'+_0x9e3529['id'],_0x9e3529);VoiceExtensionEvents[_0x25ca('0x5')](_0x29d6e3,_0x9e3529);_0x2759c9(null);};}for(var e in events){if(events[_0x25ca('0x6')](e)){var event=events[e];VoiceExtension[_0x25ca('0x7')](e,emitEvent(event));}}module[_0x25ca('0x8')]=VoiceExtensionEvents;