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 _0xe96b=['FaxQueue','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x36fbef,_0x4ffc84){var _0x45e270=function(_0x32dd95){while(--_0x32dd95){_0x36fbef['push'](_0x36fbef['shift']());}};_0x45e270(++_0x4ffc84);}(_0xe96b,0xbc));var _0xbe96=function(_0x12f8f3,_0xd36c72){_0x12f8f3=_0x12f8f3-0x0;var _0x40c709=_0xe96b[_0x12f8f3];return _0x40c709;};'use strict';var EventEmitter=require(_0xbe96('0x0'));var FaxQueue=require('../../mysqldb')['db'][_0xbe96('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xbe96('0x2')};function emitEvent(_0x3f568f){return function(_0x11717a,_0x29b3c7,_0x3e9d9e){FaxQueueEvents[_0xbe96('0x3')](_0x3f568f+':'+_0x11717a['id'],_0x11717a);FaxQueueEvents[_0xbe96('0x3')](_0x3f568f,_0x11717a);_0x3e9d9e(null);};}for(var e in events){if(events[_0xbe96('0x4')](e)){var event=events[e];FaxQueue[_0xbe96('0x5')](e,emitEvent(event));}}module[_0xbe96('0x6')]=FaxQueueEvents;