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 _0x09f5=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','update'];(function(_0x591a90,_0x5525b0){var _0x551587=function(_0xd6ad8e){while(--_0xd6ad8e){_0x591a90['push'](_0x591a90['shift']());}};_0x551587(++_0x5525b0);}(_0x09f5,0x95));var _0x509f=function(_0x579b59,_0x314df0){_0x579b59=_0x579b59-0x0;var _0x483519=_0x09f5[_0x579b59];return _0x483519;};'use strict';var EventEmitter=require(_0x509f('0x0'));var OpenchannelQueue=require(_0x509f('0x1'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x509f('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x509f('0x3'),'afterDestroy':_0x509f('0x4')};function emitEvent(_0x473a18){return function(_0x44755b,_0x1fe5ae,_0x4236be){OpenchannelQueueEvents[_0x509f('0x5')](_0x473a18+':'+_0x44755b['id'],_0x44755b);OpenchannelQueueEvents['emit'](_0x473a18,_0x44755b);_0x4236be(null);};}for(var e in events){if(events[_0x509f('0x6')](e)){var event=events[e];OpenchannelQueue[_0x509f('0x7')](e,emitEvent(event));}}module[_0x509f('0x8')]=OpenchannelQueueEvents;