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 _0xfcd5=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events'];(function(_0x270df1,_0x30030f){var _0x561060=function(_0x17977f){while(--_0x17977f){_0x270df1['push'](_0x270df1['shift']());}};_0x561060(++_0x30030f);}(_0xfcd5,0xef));var _0x5fcd=function(_0x57add2,_0x4f2b7d){_0x57add2=_0x57add2-0x0;var _0x4e3670=_0xfcd5[_0x57add2];return _0x4e3670;};'use strict';var EventEmitter=require(_0x5fcd('0x0'));var OpenchannelQueue=require('../../mysqldb')['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x5fcd('0x1')](0x0);var events={'afterCreate':_0x5fcd('0x2'),'afterUpdate':_0x5fcd('0x3'),'afterDestroy':_0x5fcd('0x4')};function emitEvent(_0x55efaa){return function(_0x12cfec,_0x1afbe8,_0x559fb3){OpenchannelQueueEvents[_0x5fcd('0x5')](_0x55efaa+':'+_0x12cfec['id'],_0x12cfec);OpenchannelQueueEvents[_0x5fcd('0x5')](_0x55efaa,_0x12cfec);_0x559fb3(null);};}for(var e in events){if(events[_0x5fcd('0x6')](e)){var event=events[e];OpenchannelQueue[_0x5fcd('0x7')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;