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 _0x2d8c=['emit','hasOwnProperty','hook','events','../../mysqldb','OpenchannelQueue','update','remove'];(function(_0x37ece3,_0x4ed5f6){var _0x3aad88=function(_0x47466d){while(--_0x47466d){_0x37ece3['push'](_0x37ece3['shift']());}};_0x3aad88(++_0x4ed5f6);}(_0x2d8c,0xc3));var _0xc2d8=function(_0x5ce3c8,_0x2503bd){_0x5ce3c8=_0x5ce3c8-0x0;var _0xa76867=_0x2d8c[_0x5ce3c8];return _0xa76867;};'use strict';var EventEmitter=require(_0xc2d8('0x0'));var OpenchannelQueue=require(_0xc2d8('0x1'))['db'][_0xc2d8('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xc2d8('0x3'),'afterDestroy':_0xc2d8('0x4')};function emitEvent(_0x504fcb){return function(_0x2be687,_0x60433e,_0x1664b4){OpenchannelQueueEvents[_0xc2d8('0x5')](_0x504fcb+':'+_0x2be687['id'],_0x2be687);OpenchannelQueueEvents[_0xc2d8('0x5')](_0x504fcb,_0x2be687);_0x1664b4(null);};}for(var e in events){if(events[_0xc2d8('0x6')](e)){var event=events[e];OpenchannelQueue[_0xc2d8('0x7')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;