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 _0x721f=['update','emit','hook','exports','events','../../mysqldb','save'];(function(_0x466f03,_0xe3f71d){var _0x1132db=function(_0x338d4b){while(--_0x338d4b){_0x466f03['push'](_0x466f03['shift']());}};_0x1132db(++_0xe3f71d);}(_0x721f,0x1d9));var _0xf721=function(_0x37e4e5,_0x93f399){_0x37e4e5=_0x37e4e5-0x0;var _0x3cf18d=_0x721f[_0x37e4e5];return _0x3cf18d;};'use strict';var EventEmitter=require(_0xf721('0x0'));var MailQueue=require(_0xf721('0x1'))['db']['MailQueue'];var MailQueueEvents=new EventEmitter();MailQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf721('0x2'),'afterUpdate':_0xf721('0x3'),'afterDestroy':'remove'};function emitEvent(_0x1abc90){return function(_0x15980d,_0x30a26b,_0x35dd01){MailQueueEvents[_0xf721('0x4')](_0x1abc90+':'+_0x15980d['id'],_0x15980d);MailQueueEvents['emit'](_0x1abc90,_0x15980d);_0x35dd01(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailQueue[_0xf721('0x5')](e,emitEvent(event));}}module[_0xf721('0x6')]=MailQueueEvents;