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 _0xc1be=['exports','../../mysqldb','FaxQueue','save','update','emit'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xc1be,0x1a5));var _0xec1b=function(_0x232725,_0x2f38ad){_0x232725=_0x232725-0x0;var _0x5a8576=_0xc1be[_0x232725];return _0x5a8576;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0xec1b('0x0'))['db'][_0xec1b('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xec1b('0x2'),'afterUpdate':_0xec1b('0x3'),'afterDestroy':'remove'};function emitEvent(_0x1ecaf0){return function(_0x4326bd,_0x5cbdae,_0x65edec){FaxQueueEvents[_0xec1b('0x4')](_0x1ecaf0+':'+_0x4326bd['id'],_0x4326bd);FaxQueueEvents[_0xec1b('0x4')](_0x1ecaf0,_0x4326bd);_0x65edec(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xec1b('0x5')]=FaxQueueEvents;