1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xd08e=['update','remove','emit','hasOwnProperty','events','../../mysqldb','setMaxListeners','save'];(function(_0x54b198,_0x2ff0d0){var _0x5ec0e5=function(_0x2d2fef){while(--_0x2d2fef){_0x54b198['push'](_0x54b198['shift']());}};_0x5ec0e5(++_0x2ff0d0);}(_0xd08e,0x9c));var _0xed08=function(_0x44a64f,_0x38475c){_0x44a64f=_0x44a64f-0x0;var _0x52024b=_0xd08e[_0x44a64f];return _0x52024b;};'use strict';var EventEmitter=require(_0xed08('0x0'));var VoiceQueue=require(_0xed08('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xed08('0x2')](0x0);var events={'afterCreate':_0xed08('0x3'),'afterUpdate':_0xed08('0x4'),'afterDestroy':_0xed08('0x5')};function emitEvent(_0xeb0d3c){return function(_0x4b673f,_0x421899,_0x1b48ea){VoiceQueueEvents[_0xed08('0x6')](_0xeb0d3c+':'+_0x4b673f['id'],_0x4b673f);VoiceQueueEvents[_0xed08('0x6')](_0xeb0d3c,_0x4b673f);_0x1b48ea(null);};}for(var e in events){if(events[_0xed08('0x7')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;