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 _0x2f77=['emit','hasOwnProperty','hook','events','../../mysqldb','setMaxListeners','update','remove'];(function(_0x559aba,_0x392da1){var _0x4a3380=function(_0xb5cda8){while(--_0xb5cda8){_0x559aba['push'](_0x559aba['shift']());}};_0x4a3380(++_0x392da1);}(_0x2f77,0x12b));var _0x72f7=function(_0x57c0a0,_0x185648){_0x57c0a0=_0x57c0a0-0x0;var _0x2750db=_0x2f77[_0x57c0a0];return _0x2750db;};'use strict';var EventEmitter=require(_0x72f7('0x0'));var FaxQueue=require(_0x72f7('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x72f7('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x72f7('0x3'),'afterDestroy':_0x72f7('0x4')};function emitEvent(_0x117d3c){return function(_0x1466fa,_0x474889,_0xf6505d){FaxQueueEvents[_0x72f7('0x5')](_0x117d3c+':'+_0x1466fa['id'],_0x1466fa);FaxQueueEvents['emit'](_0x117d3c,_0x1466fa);_0xf6505d(null);};}for(var e in events){if(events[_0x72f7('0x6')](e)){var event=events[e];FaxQueue[_0x72f7('0x7')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;