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 _0xed96=['../../mysqldb','MailSubstatus','setMaxListeners','update','emit','hasOwnProperty','hook','events'];(function(_0x187ee1,_0x3fd1e6){var _0x388160=function(_0x542dd2){while(--_0x542dd2){_0x187ee1['push'](_0x187ee1['shift']());}};_0x388160(++_0x3fd1e6);}(_0xed96,0x1b7));var _0x6ed9=function(_0x5138e0,_0x24fbbc){_0x5138e0=_0x5138e0-0x0;var _0x18e57b=_0xed96[_0x5138e0];return _0x18e57b;};'use strict';var EventEmitter=require(_0x6ed9('0x0'));var MailSubstatus=require(_0x6ed9('0x1'))['db'][_0x6ed9('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x6ed9('0x3')](0x0);var events={'afterUpdate':_0x6ed9('0x4')};function emitEvent(_0x56d92e){return function(_0x5f2bbc,_0x4149bd,_0x5bdca9){MailSubstatusEvents[_0x6ed9('0x5')](_0x56d92e+':'+_0x5f2bbc['id'],_0x5f2bbc);MailSubstatusEvents['emit'](_0x56d92e,_0x5f2bbc);_0x5bdca9(null);};}for(var e in events){if(events[_0x6ed9('0x6')](e)){var event=events[e];MailSubstatus[_0x6ed9('0x7')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;