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 _0x535e=['remove','emit','hasOwnProperty','hook','exports','OpenchannelQueue','save'];(function(_0x4c6581,_0xce8c04){var _0x1ea987=function(_0x14edbb){while(--_0x14edbb){_0x4c6581['push'](_0x4c6581['shift']());}};_0x1ea987(++_0xce8c04);}(_0x535e,0x19b));var _0xe535=function(_0x53b67d,_0x251707){_0x53b67d=_0x53b67d-0x0;var _0xff73e7=_0x535e[_0x53b67d];return _0xff73e7;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require('../../mysqldb')['db'][_0xe535('0x0')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe535('0x1'),'afterUpdate':'update','afterDestroy':_0xe535('0x2')};function emitEvent(_0x10f471){return function(_0x4c622a,_0x4f29a7,_0x1bbfa5){OpenchannelQueueEvents[_0xe535('0x3')](_0x10f471+':'+_0x4c622a['id'],_0x4c622a);OpenchannelQueueEvents['emit'](_0x10f471,_0x4c622a);_0x1bbfa5(null);};}for(var e in events){if(events[_0xe535('0x4')](e)){var event=events[e];OpenchannelQueue[_0xe535('0x5')](e,emitEvent(event));}}module[_0xe535('0x6')]=OpenchannelQueueEvents;