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 _0xe69c=['setMaxListeners','remove','emit','hasOwnProperty','hook','events','OpenchannelQueue'];(function(_0x15354a,_0x37e8dd){var _0x3edf27=function(_0xa0d3df){while(--_0xa0d3df){_0x15354a['push'](_0x15354a['shift']());}};_0x3edf27(++_0x37e8dd);}(_0xe69c,0xd7));var _0xce69=function(_0x5a5502,_0x3bc1d4){_0x5a5502=_0x5a5502-0x0;var _0x4da170=_0xe69c[_0x5a5502];return _0x4da170;};'use strict';var EventEmitter=require(_0xce69('0x0'));var OpenchannelQueue=require('../../mysqldb')['db'][_0xce69('0x1')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0xce69('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xce69('0x3')};function emitEvent(_0x7872b5){return function(_0x1b7cb2,_0x1a8560,_0x34a802){OpenchannelQueueEvents[_0xce69('0x4')](_0x7872b5+':'+_0x1b7cb2['id'],_0x1b7cb2);OpenchannelQueueEvents[_0xce69('0x4')](_0x7872b5,_0x1b7cb2);_0x34a802(null);};}for(var e in events){if(events[_0xce69('0x5')](e)){var event=events[e];OpenchannelQueue[_0xce69('0x6')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;