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 _0x6b38=['remove','emit','hasOwnProperty','events','../../mysqldb','save','update'];(function(_0x21b495,_0xa411fa){var _0x3e163b=function(_0x38148b){while(--_0x38148b){_0x21b495['push'](_0x21b495['shift']());}};_0x3e163b(++_0xa411fa);}(_0x6b38,0x65));var _0x86b3=function(_0x2aefd0,_0x33df9a){_0x2aefd0=_0x2aefd0-0x0;var _0x48e84b=_0x6b38[_0x2aefd0];return _0x48e84b;};'use strict';var EventEmitter=require(_0x86b3('0x0'));var ChatQueue=require(_0x86b3('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x86b3('0x2'),'afterUpdate':_0x86b3('0x3'),'afterDestroy':_0x86b3('0x4')};function emitEvent(_0x42db79){return function(_0x1b50a7,_0xea0832,_0x18b7a1){ChatQueueEvents[_0x86b3('0x5')](_0x42db79+':'+_0x1b50a7['id'],_0x1b50a7);ChatQueueEvents[_0x86b3('0x5')](_0x42db79,_0x1b50a7);_0x18b7a1(null);};}for(var e in events){if(events[_0x86b3('0x6')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module['exports']=ChatQueueEvents;