Built motion from commit (unavailable).|2.4.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 _0xcd4d=['exports','events','../../mysqldb','VoiceQueue','setMaxListeners','save','remove','emit','hook'];(function(_0x4ce9f7,_0x3e2b74){var _0x47cb35=function(_0x4dce37){while(--_0x4dce37){_0x4ce9f7['push'](_0x4ce9f7['shift']());}};_0x47cb35(++_0x3e2b74);}(_0xcd4d,0x1a8));var _0xdcd4=function(_0xd0cd1,_0x328b6c){_0xd0cd1=_0xd0cd1-0x0;var _0x1da412=_0xcd4d[_0xd0cd1];return _0x1da412;};'use strict';var EventEmitter=require(_0xdcd4('0x0'));var VoiceQueue=require(_0xdcd4('0x1'))['db'][_0xdcd4('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xdcd4('0x3')](0x0);var events={'afterCreate':_0xdcd4('0x4'),'afterUpdate':'update','afterDestroy':_0xdcd4('0x5')};function emitEvent(_0x233968){return function(_0x54f49b,_0x4e291c,_0x250397){VoiceQueueEvents[_0xdcd4('0x6')](_0x233968+':'+_0x54f49b['id'],_0x54f49b);VoiceQueueEvents[_0xdcd4('0x6')](_0x233968,_0x54f49b);_0x250397(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0xdcd4('0x7')](e,emitEvent(event));}}module[_0xdcd4('0x8')]=VoiceQueueEvents;