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 _0x1439=['emit','hasOwnProperty','events','../../mysqldb','save','update','remove'];(function(_0x56737a,_0x29cb2e){var _0x47e109=function(_0x1e6d38){while(--_0x1e6d38){_0x56737a['push'](_0x56737a['shift']());}};_0x47e109(++_0x29cb2e);}(_0x1439,0x1e5));var _0x9143=function(_0x2e603b,_0x52345e){_0x2e603b=_0x2e603b-0x0;var _0x208f71=_0x1439[_0x2e603b];return _0x208f71;};'use strict';var EventEmitter=require(_0x9143('0x0'));var VoiceQueue=require(_0x9143('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9143('0x2'),'afterUpdate':_0x9143('0x3'),'afterDestroy':_0x9143('0x4')};function emitEvent(_0x375ae0){return function(_0x525940,_0x4ae96e,_0x4f395c){VoiceQueueEvents[_0x9143('0x5')](_0x375ae0+':'+_0x525940['id'],_0x525940);VoiceQueueEvents['emit'](_0x375ae0,_0x525940);_0x4f395c(null);};}for(var e in events){if(events[_0x9143('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;