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 _0xf29b=['hasOwnProperty','exports','../../mysqldb','MailSubstatus','setMaxListeners','update','emit'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0xf29b,0x191));var _0xbf29=function(_0x434635,_0x32fee1){_0x434635=_0x434635-0x0;var _0x2f8f95=_0xf29b[_0x434635];return _0x2f8f95;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0xbf29('0x0'))['db'][_0xbf29('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xbf29('0x2')](0x0);var events={'afterUpdate':_0xbf29('0x3')};function emitEvent(_0x5ef3b3){return function(_0x534d90,_0x8ad26b,_0x1712a2){MailSubstatusEvents[_0xbf29('0x4')](_0x5ef3b3+':'+_0x534d90['id'],_0x534d90);MailSubstatusEvents[_0xbf29('0x4')](_0x5ef3b3,_0x534d90);_0x1712a2(null);};}for(var e in events){if(events[_0xbf29('0x5')](e)){var event=events[e];MailSubstatus['hook'](e,emitEvent(event));}}module[_0xbf29('0x6')]=MailSubstatusEvents;