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 _0xe7b5=['../../mysqldb','ChatQueue','save','update','emit','hasOwnProperty','exports'];(function(_0x9ccc17,_0x1d087c){var _0x46e989=function(_0x302510){while(--_0x302510){_0x9ccc17['push'](_0x9ccc17['shift']());}};_0x46e989(++_0x1d087c);}(_0xe7b5,0x9a));var _0x5e7b=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xe7b5[_0x42cae2];return _0x5f256f;};'use strict';var EventEmitter=require('events');var ChatQueue=require(_0x5e7b('0x0'))['db'][_0x5e7b('0x1')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5e7b('0x2'),'afterUpdate':_0x5e7b('0x3'),'afterDestroy':'remove'};function emitEvent(_0x1a4d18){return function(_0x3fc96a,_0x3a3b46,_0x1a4221){ChatQueueEvents[_0x5e7b('0x4')](_0x1a4d18+':'+_0x3fc96a['id'],_0x3fc96a);ChatQueueEvents[_0x5e7b('0x4')](_0x1a4d18,_0x3fc96a);_0x1a4221(null);};}for(var e in events){if(events[_0x5e7b('0x5')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0x5e7b('0x6')]=ChatQueueEvents;