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 _0xe0e6=['hasOwnProperty','hook','exports','../../mysqldb','MailSubstatus','update','emit'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xe0e6,0x1a7));var _0x6e0e=function(_0x32c97a,_0x29b6fc){_0x32c97a=_0x32c97a-0x0;var _0x5de34d=_0xe0e6[_0x32c97a];return _0x5de34d;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0x6e0e('0x0'))['db'][_0x6e0e('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents['setMaxListeners'](0x0);var events={'afterUpdate':_0x6e0e('0x2')};function emitEvent(_0x3eac31){return function(_0x19a8b1,_0x5546a3,_0xdfe364){MailSubstatusEvents[_0x6e0e('0x3')](_0x3eac31+':'+_0x19a8b1['id'],_0x19a8b1);MailSubstatusEvents['emit'](_0x3eac31,_0x19a8b1);_0xdfe364(null);};}for(var e in events){if(events[_0x6e0e('0x4')](e)){var event=events[e];MailSubstatus[_0x6e0e('0x5')](e,emitEvent(event));}}module[_0x6e0e('0x6')]=MailSubstatusEvents;