Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / voiceQueue / voiceQueue.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 _0x34de=['../../mysqldb','VoiceQueue','setMaxListeners','save','update','remove','emit','hook','exports'];(function(_0xaec50c,_0x11cfd1){var _0x15b23d=function(_0x3da97c){while(--_0x3da97c){_0xaec50c['push'](_0xaec50c['shift']());}};_0x15b23d(++_0x11cfd1);}(_0x34de,0x120));var _0xe34d=function(_0x2f0e03,_0x238418){_0x2f0e03=_0x2f0e03-0x0;var _0x1b5588=_0x34de[_0x2f0e03];return _0x1b5588;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0xe34d('0x0'))['db'][_0xe34d('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xe34d('0x2')](0x0);var events={'afterCreate':_0xe34d('0x3'),'afterUpdate':_0xe34d('0x4'),'afterDestroy':_0xe34d('0x5')};function emitEvent(_0x308e1a){return function(_0x336f0b,_0x42502a,_0x18a0d5){VoiceQueueEvents[_0xe34d('0x6')](_0x308e1a+':'+_0x336f0b['id'],_0x336f0b);VoiceQueueEvents[_0xe34d('0x6')](_0x308e1a,_0x336f0b);_0x18a0d5(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0xe34d('0x7')](e,emitEvent(event));}}module[_0xe34d('0x8')]=VoiceQueueEvents;