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 _0x235a=['../../mysqldb','ChatQueue','save','remove','emit','hasOwnProperty','exports','events'];(function(_0x533529,_0x329f47){var _0xc6a506=function(_0x349d5b){while(--_0x349d5b){_0x533529['push'](_0x533529['shift']());}};_0xc6a506(++_0x329f47);}(_0x235a,0x1ef));var _0xa235=function(_0x6cfd5d,_0x1aa789){_0x6cfd5d=_0x6cfd5d-0x0;var _0x22610e=_0x235a[_0x6cfd5d];return _0x22610e;};'use strict';var EventEmitter=require(_0xa235('0x0'));var ChatQueue=require(_0xa235('0x1'))['db'][_0xa235('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa235('0x3'),'afterUpdate':'update','afterDestroy':_0xa235('0x4')};function emitEvent(_0x2f7920){return function(_0x277a68,_0x314ebf,_0x2e6eca){ChatQueueEvents[_0xa235('0x5')](_0x2f7920+':'+_0x277a68['id'],_0x277a68);ChatQueueEvents[_0xa235('0x5')](_0x2f7920,_0x277a68);_0x2e6eca(null);};}for(var e in events){if(events[_0xa235('0x6')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0xa235('0x7')]=ChatQueueEvents;