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 _0xd35c=['../../mysqldb','OpenchannelQueue','save','remove','emit','hook','exports','events'];(function(_0x586fc3,_0x36e4f8){var _0x2eed73=function(_0x205b1b){while(--_0x205b1b){_0x586fc3['push'](_0x586fc3['shift']());}};_0x2eed73(++_0x36e4f8);}(_0xd35c,0x8f));var _0xcd35=function(_0x3fc13f,_0x30f32b){_0x3fc13f=_0x3fc13f-0x0;var _0x98b72f=_0xd35c[_0x3fc13f];return _0x98b72f;};'use strict';var EventEmitter=require(_0xcd35('0x0'));var OpenchannelQueue=require(_0xcd35('0x1'))['db'][_0xcd35('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xcd35('0x3'),'afterUpdate':'update','afterDestroy':_0xcd35('0x4')};function emitEvent(_0x5a9497){return function(_0x54bc90,_0x54c33d,_0x46d24c){OpenchannelQueueEvents['emit'](_0x5a9497+':'+_0x54bc90['id'],_0x54bc90);OpenchannelQueueEvents[_0xcd35('0x5')](_0x5a9497,_0x54bc90);_0x46d24c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelQueue[_0xcd35('0x6')](e,emitEvent(event));}}module[_0xcd35('0x7')]=OpenchannelQueueEvents;