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 _0xc82b=['remove','emit','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x2f8519,_0x3bd5e1){var _0x4efaf8=function(_0x2fefc1){while(--_0x2fefc1){_0x2f8519['push'](_0x2f8519['shift']());}};_0x4efaf8(++_0x3bd5e1);}(_0xc82b,0x1b4));var _0xbc82=function(_0x8894af,_0x17c3c6){_0x8894af=_0x8894af-0x0;var _0x14a3d5=_0xc82b[_0x8894af];return _0x14a3d5;};'use strict';var EventEmitter=require(_0xbc82('0x0'));var FaxQueue=require(_0xbc82('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xbc82('0x2')](0x0);var events={'afterCreate':_0xbc82('0x3'),'afterUpdate':_0xbc82('0x4'),'afterDestroy':_0xbc82('0x5')};function emitEvent(_0x18f1f1){return function(_0x2d090f,_0x35a660,_0x45a48c){FaxQueueEvents[_0xbc82('0x6')](_0x18f1f1+':'+_0x2d090f['id'],_0x2d090f);FaxQueueEvents[_0xbc82('0x6')](_0x18f1f1,_0x2d090f);_0x45a48c(null);};}for(var e in events){if(events[_0xbc82('0x7')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xbc82('0x8')]=FaxQueueEvents;