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 _0xe594=['setMaxListeners','save','update','remove','emit','hook','events','ChatQueue'];(function(_0x37e7a1,_0x186462){var _0x46cd75=function(_0x31a0c6){while(--_0x31a0c6){_0x37e7a1['push'](_0x37e7a1['shift']());}};_0x46cd75(++_0x186462);}(_0xe594,0x66));var _0x4e59=function(_0x54f423,_0x5795f5){_0x54f423=_0x54f423-0x0;var _0x240e23=_0xe594[_0x54f423];return _0x240e23;};'use strict';var EventEmitter=require(_0x4e59('0x0'));var ChatQueue=require('../../mysqldb')['db'][_0x4e59('0x1')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x4e59('0x2')](0x0);var events={'afterCreate':_0x4e59('0x3'),'afterUpdate':_0x4e59('0x4'),'afterDestroy':_0x4e59('0x5')};function emitEvent(_0x33ddee){return function(_0x5c8949,_0x544db4,_0x2d3c4c){ChatQueueEvents[_0x4e59('0x6')](_0x33ddee+':'+_0x5c8949['id'],_0x5c8949);ChatQueueEvents[_0x4e59('0x6')](_0x33ddee,_0x5c8949);_0x2d3c4c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0x4e59('0x7')](e,emitEvent(event));}}module['exports']=ChatQueueEvents;