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 _0xfb53=['hook','exports','events','../../mysqldb','setMaxListeners','update','emit','hasOwnProperty'];(function(_0xac7dc,_0x3aa839){var _0x26974a=function(_0x1453f0){while(--_0x1453f0){_0xac7dc['push'](_0xac7dc['shift']());}};_0x26974a(++_0x3aa839);}(_0xfb53,0xf2));var _0x3fb5=function(_0x5459b0,_0x4d2ef8){_0x5459b0=_0x5459b0-0x0;var _0x675a35=_0xfb53[_0x5459b0];return _0x675a35;};'use strict';var EventEmitter=require(_0x3fb5('0x0'));var MailSubstatus=require(_0x3fb5('0x1'))['db']['MailSubstatus'];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x3fb5('0x2')](0x0);var events={'afterUpdate':_0x3fb5('0x3')};function emitEvent(_0x498154){return function(_0x44942d,_0x1bb90d,_0x42bfa7){MailSubstatusEvents[_0x3fb5('0x4')](_0x498154+':'+_0x44942d['id'],_0x44942d);MailSubstatusEvents[_0x3fb5('0x4')](_0x498154,_0x44942d);_0x42bfa7(null);};}for(var e in events){if(events[_0x3fb5('0x5')](e)){var event=events[e];MailSubstatus[_0x3fb5('0x6')](e,emitEvent(event));}}module[_0x3fb5('0x7')]=MailSubstatusEvents;