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 _0xfc79=['hasOwnProperty','hook','../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xfc79,0xe3));var _0x9fc7=function(_0x330ff4,_0x11615b){_0x330ff4=_0x330ff4-0x0;var _0x2b4ee4=_0xfc79[_0x330ff4];return _0x2b4ee4;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0x9fc7('0x0'))['db'][_0x9fc7('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x9fc7('0x2')](0x0);var events={'afterCreate':_0x9fc7('0x3'),'afterUpdate':_0x9fc7('0x4'),'afterDestroy':_0x9fc7('0x5')};function emitEvent(_0x5cb82b){return function(_0x404f20,_0x2c859f,_0x575047){FaxQueueEvents[_0x9fc7('0x6')](_0x5cb82b+':'+_0x404f20['id'],_0x404f20);FaxQueueEvents[_0x9fc7('0x6')](_0x5cb82b,_0x404f20);_0x575047(null);};}for(var e in events){if(events[_0x9fc7('0x7')](e)){var event=events[e];FaxQueue[_0x9fc7('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;