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 _0x92da=['update','emit','hasOwnProperty','hook','MailSubstatus','setMaxListeners'];(function(_0x23aa86,_0x5bb797){var _0x42b51b=function(_0x258b8){while(--_0x258b8){_0x23aa86['push'](_0x23aa86['shift']());}};_0x42b51b(++_0x5bb797);}(_0x92da,0x1a2));var _0xa92d=function(_0x5497a7,_0x4ac7ec){_0x5497a7=_0x5497a7-0x0;var _0x32fbfc=_0x92da[_0x5497a7];return _0x32fbfc;};'use strict';var EventEmitter=require('events');var MailSubstatus=require('../../mysqldb')['db'][_0xa92d('0x0')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xa92d('0x1')](0x0);var events={'afterUpdate':_0xa92d('0x2')};function emitEvent(_0x215780){return function(_0x216e2c,_0x5bc967,_0x5eae0c){MailSubstatusEvents[_0xa92d('0x3')](_0x215780+':'+_0x216e2c['id'],_0x216e2c);MailSubstatusEvents[_0xa92d('0x3')](_0x215780,_0x216e2c);_0x5eae0c(null);};}for(var e in events){if(events[_0xa92d('0x4')](e)){var event=events[e];MailSubstatus[_0xa92d('0x5')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;