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 _0x007f=['MailQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0xbd08b4,_0x4790ed){var _0x314f1e=function(_0x161589){while(--_0x161589){_0xbd08b4['push'](_0xbd08b4['shift']());}};_0x314f1e(++_0x4790ed);}(_0x007f,0x174));var _0xf007=function(_0x5c48ea,_0x2191a2){_0x5c48ea=_0x5c48ea-0x0;var _0x1262dc=_0x007f[_0x5c48ea];return _0x1262dc;};'use strict';var EventEmitter=require(_0xf007('0x0'));var MailQueue=require(_0xf007('0x1'))['db'][_0xf007('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xf007('0x3')](0x0);var events={'afterCreate':_0xf007('0x4'),'afterUpdate':_0xf007('0x5'),'afterDestroy':_0xf007('0x6')};function emitEvent(_0x5d5ddd){return function(_0x22e0f5,_0x5a7a99,_0x38bd3b){MailQueueEvents[_0xf007('0x7')](_0x5d5ddd+':'+_0x22e0f5['id'],_0x22e0f5);MailQueueEvents['emit'](_0x5d5ddd,_0x22e0f5);_0x38bd3b(null);};}for(var e in events){if(events[_0xf007('0x8')](e)){var event=events[e];MailQueue[_0xf007('0x9')](e,emitEvent(event));}}module[_0xf007('0xa')]=MailQueueEvents;