Built motion from commit (unavailable).|2.5.4
[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 _0x51b7=['emit','exports','events','../../mysqldb','VoiceQueue','setMaxListeners','update','remove'];(function(_0x15ca1a,_0x30fc82){var _0x507626=function(_0x14c9bc){while(--_0x14c9bc){_0x15ca1a['push'](_0x15ca1a['shift']());}};_0x507626(++_0x30fc82);}(_0x51b7,0x142));var _0x751b=function(_0x4e3296,_0x145ddd){_0x4e3296=_0x4e3296-0x0;var _0x11e01d=_0x51b7[_0x4e3296];return _0x11e01d;};'use strict';var EventEmitter=require(_0x751b('0x0'));var VoiceQueue=require(_0x751b('0x1'))['db'][_0x751b('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x751b('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x751b('0x4'),'afterDestroy':_0x751b('0x5')};function emitEvent(_0x401277){return function(_0x39e863,_0xd9512c,_0x48bcd8){VoiceQueueEvents[_0x751b('0x6')](_0x401277+':'+_0x39e863['id'],_0x39e863);VoiceQueueEvents[_0x751b('0x6')](_0x401277,_0x39e863);_0x48bcd8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x751b('0x7')]=VoiceQueueEvents;