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 _0x1fa8=['exports','events','../../mysqldb','update','emit'];(function(_0x2aa22d,_0x375edf){var _0x683fa5=function(_0x4b9643){while(--_0x4b9643){_0x2aa22d['push'](_0x2aa22d['shift']());}};_0x683fa5(++_0x375edf);}(_0x1fa8,0x10f));var _0x81fa=function(_0x35790b,_0x4652c3){_0x35790b=_0x35790b-0x0;var _0x1ebbf9=_0x1fa8[_0x35790b];return _0x1ebbf9;};'use strict';var EventEmitter=require(_0x81fa('0x0'));var FaxQueue=require(_0x81fa('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x81fa('0x2'),'afterDestroy':'remove'};function emitEvent(_0x33477f){return function(_0x231a12,_0x385324,_0x27d62d){FaxQueueEvents[_0x81fa('0x3')](_0x33477f+':'+_0x231a12['id'],_0x231a12);FaxQueueEvents[_0x81fa('0x3')](_0x33477f,_0x231a12);_0x27d62d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0x81fa('0x4')]=FaxQueueEvents;