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 _0x7ac7=['exports','../../mysqldb','MailSubstatus','setMaxListeners','emit','hook'];(function(_0x19a49f,_0x444d74){var _0x5351ae=function(_0x58b1ed){while(--_0x58b1ed){_0x19a49f['push'](_0x19a49f['shift']());}};_0x5351ae(++_0x444d74);}(_0x7ac7,0x115));var _0x77ac=function(_0x3d7cbf,_0x42f54d){_0x3d7cbf=_0x3d7cbf-0x0;var _0x5e8091=_0x7ac7[_0x3d7cbf];return _0x5e8091;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0x77ac('0x0'))['db'][_0x77ac('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x77ac('0x2')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x1d460a){return function(_0x322e70,_0x1a7e5b,_0x3cf3b1){MailSubstatusEvents[_0x77ac('0x3')](_0x1d460a+':'+_0x322e70['id'],_0x322e70);MailSubstatusEvents['emit'](_0x1d460a,_0x322e70);_0x3cf3b1(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x77ac('0x4')](e,emitEvent(event));}}module[_0x77ac('0x5')]=MailSubstatusEvents;