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 _0x987f=['emit','hook','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x987f,0x17c));var _0xf987=function(_0x4080dd,_0x5b595d){_0x4080dd=_0x4080dd-0x0;var _0x4ecf85=_0x987f[_0x4080dd];return _0x4ecf85;};'use strict';var EventEmitter=require(_0xf987('0x0'));var FaxQueue=require(_0xf987('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xf987('0x2')](0x0);var events={'afterCreate':_0xf987('0x3'),'afterUpdate':_0xf987('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1dfa61){return function(_0x1a6029,_0x411a52,_0x38f5b1){FaxQueueEvents[_0xf987('0x5')](_0x1dfa61+':'+_0x1a6029['id'],_0x1a6029);FaxQueueEvents[_0xf987('0x5')](_0x1dfa61,_0x1a6029);_0x38f5b1(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0xf987('0x6')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;