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 _0xffb1=['exports','events','FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0xaf29da,_0x117f5a){var _0x295c51=function(_0x3feaf4){while(--_0x3feaf4){_0xaf29da['push'](_0xaf29da['shift']());}};_0x295c51(++_0x117f5a);}(_0xffb1,0x160));var _0x1ffb=function(_0x53f402,_0x326920){_0x53f402=_0x53f402-0x0;var _0x45a76d=_0xffb1[_0x53f402];return _0x45a76d;};'use strict';var EventEmitter=require(_0x1ffb('0x0'));var FaxQueue=require('../../mysqldb')['db'][_0x1ffb('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x1ffb('0x2')](0x0);var events={'afterCreate':_0x1ffb('0x3'),'afterUpdate':_0x1ffb('0x4'),'afterDestroy':_0x1ffb('0x5')};function emitEvent(_0x4a2992){return function(_0x2bfa2f,_0x4f704f,_0x35cae8){FaxQueueEvents[_0x1ffb('0x6')](_0x4a2992+':'+_0x2bfa2f['id'],_0x2bfa2f);FaxQueueEvents[_0x1ffb('0x6')](_0x4a2992,_0x2bfa2f);_0x35cae8(null);};}for(var e in events){if(events[_0x1ffb('0x7')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0x1ffb('0x8')]=FaxQueueEvents;