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 _0x8a1b=['hasOwnProperty','hook','exports','../../mysqldb','MailSubstatus','setMaxListeners','update','emit'];(function(_0x46cb35,_0x2b92ab){var _0x847507=function(_0x29b091){while(--_0x29b091){_0x46cb35['push'](_0x46cb35['shift']());}};_0x847507(++_0x2b92ab);}(_0x8a1b,0xa3));var _0xb8a1=function(_0x187872,_0x54da16){_0x187872=_0x187872-0x0;var _0x1517f6=_0x8a1b[_0x187872];return _0x1517f6;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0xb8a1('0x0'))['db'][_0xb8a1('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xb8a1('0x2')](0x0);var events={'afterUpdate':_0xb8a1('0x3')};function emitEvent(_0x6555d4){return function(_0x5bb2a7,_0x121cab,_0x5678c3){MailSubstatusEvents[_0xb8a1('0x4')](_0x6555d4+':'+_0x5bb2a7['id'],_0x5bb2a7);MailSubstatusEvents[_0xb8a1('0x4')](_0x6555d4,_0x5bb2a7);_0x5678c3(null);};}for(var e in events){if(events[_0xb8a1('0x5')](e)){var event=events[e];MailSubstatus[_0xb8a1('0x6')](e,emitEvent(event));}}module[_0xb8a1('0x7')]=MailSubstatusEvents;