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 _0xdf8a=['update','remove','emit','hasOwnProperty','hook','../../mysqldb','VoiceQueue','setMaxListeners','save'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xdf8a,0x1b5));var _0xadf8=function(_0x4e9274,_0x49576e){_0x4e9274=_0x4e9274-0x0;var _0x8b474c=_0xdf8a[_0x4e9274];return _0x8b474c;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0xadf8('0x0'))['db'][_0xadf8('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xadf8('0x2')](0x0);var events={'afterCreate':_0xadf8('0x3'),'afterUpdate':_0xadf8('0x4'),'afterDestroy':_0xadf8('0x5')};function emitEvent(_0x16c48b){return function(_0x430699,_0xaf7a62,_0x18322f){VoiceQueueEvents[_0xadf8('0x6')](_0x16c48b+':'+_0x430699['id'],_0x430699);VoiceQueueEvents['emit'](_0x16c48b,_0x430699);_0x18322f(null);};}for(var e in events){if(events[_0xadf8('0x7')](e)){var event=events[e];VoiceQueue[_0xadf8('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;