Built motion from commit (unavailable).|2.4.18
[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 _0x9dfc=['VoiceQueue','setMaxListeners','save','emit','hasOwnProperty','hook','exports','events'];(function(_0x36ed48,_0x1ee0d4){var _0x51c63a=function(_0x2d0a40){while(--_0x2d0a40){_0x36ed48['push'](_0x36ed48['shift']());}};_0x51c63a(++_0x1ee0d4);}(_0x9dfc,0xdf));var _0xc9df=function(_0x772ceb,_0x3c2dc5){_0x772ceb=_0x772ceb-0x0;var _0x14e448=_0x9dfc[_0x772ceb];return _0x14e448;};'use strict';var EventEmitter=require(_0xc9df('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0xc9df('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xc9df('0x2')](0x0);var events={'afterCreate':_0xc9df('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5dff5c){return function(_0x131e70,_0x334b32,_0xcc6d49){VoiceQueueEvents[_0xc9df('0x4')](_0x5dff5c+':'+_0x131e70['id'],_0x131e70);VoiceQueueEvents['emit'](_0x5dff5c,_0x131e70);_0xcc6d49(null);};}for(var e in events){if(events[_0xc9df('0x5')](e)){var event=events[e];VoiceQueue[_0xc9df('0x6')](e,emitEvent(event));}}module[_0xc9df('0x7')]=VoiceQueueEvents;