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 _0x9a45=['update','remove','hook','ChatQueue','setMaxListeners','save'];(function(_0x3c24ff,_0x4d3305){var _0x41ac70=function(_0x20209b){while(--_0x20209b){_0x3c24ff['push'](_0x3c24ff['shift']());}};_0x41ac70(++_0x4d3305);}(_0x9a45,0x11d));var _0x59a4=function(_0xa23904,_0x2dc7a9){_0xa23904=_0xa23904-0x0;var _0x7548c6=_0x9a45[_0xa23904];return _0x7548c6;};'use strict';var EventEmitter=require('events');var ChatQueue=require('../../mysqldb')['db'][_0x59a4('0x0')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x59a4('0x1')](0x0);var events={'afterCreate':_0x59a4('0x2'),'afterUpdate':_0x59a4('0x3'),'afterDestroy':_0x59a4('0x4')};function emitEvent(_0x2c06ef){return function(_0xeb0162,_0x16da99,_0x25e40b){ChatQueueEvents['emit'](_0x2c06ef+':'+_0xeb0162['id'],_0xeb0162);ChatQueueEvents['emit'](_0x2c06ef,_0xeb0162);_0x25e40b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0x59a4('0x5')](e,emitEvent(event));}}module['exports']=ChatQueueEvents;