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 _0x0e9f=['hasOwnProperty','exports','events','../../mysqldb','save','emit'];(function(_0x235d0d,_0x33677b){var _0x4c3380=function(_0x187c61){while(--_0x187c61){_0x235d0d['push'](_0x235d0d['shift']());}};_0x4c3380(++_0x33677b);}(_0x0e9f,0x116));var _0xf0e9=function(_0x1c7aa5,_0x3bf86e){_0x1c7aa5=_0x1c7aa5-0x0;var _0x4a2561=_0x0e9f[_0x1c7aa5];return _0x4a2561;};'use strict';var EventEmitter=require(_0xf0e9('0x0'));var ChatQueue=require(_0xf0e9('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf0e9('0x2'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x2d2d99){return function(_0x559cad,_0x52a19d,_0x159a42){ChatQueueEvents[_0xf0e9('0x3')](_0x2d2d99+':'+_0x559cad['id'],_0x559cad);ChatQueueEvents['emit'](_0x2d2d99,_0x559cad);_0x159a42(null);};}for(var e in events){if(events[_0xf0e9('0x4')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0xf0e9('0x5')]=ChatQueueEvents;