Built motion from commit (unavailable).|2.5.6
[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 _0x3bf9=['save','update','remove','emit','hook','exports','events','VoiceQueue','setMaxListeners'];(function(_0x59d89e,_0x55edf5){var _0x554e93=function(_0x3d40bc){while(--_0x3d40bc){_0x59d89e['push'](_0x59d89e['shift']());}};_0x554e93(++_0x55edf5);}(_0x3bf9,0x102));var _0x93bf=function(_0x25678f,_0x5958d5){_0x25678f=_0x25678f-0x0;var _0x1961b5=_0x3bf9[_0x25678f];return _0x1961b5;};'use strict';var EventEmitter=require(_0x93bf('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0x93bf('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x93bf('0x2')](0x0);var events={'afterCreate':_0x93bf('0x3'),'afterUpdate':_0x93bf('0x4'),'afterDestroy':_0x93bf('0x5')};function emitEvent(_0x4f69b6){return function(_0x4b4393,_0x2cbd52,_0x15b0fd){VoiceQueueEvents[_0x93bf('0x6')](_0x4f69b6+':'+_0x4b4393['id'],_0x4b4393);VoiceQueueEvents[_0x93bf('0x6')](_0x4f69b6,_0x4b4393);_0x15b0fd(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x93bf('0x7')](e,emitEvent(event));}}module[_0x93bf('0x8')]=VoiceQueueEvents;