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 _0x4f3f=['hook','exports','events','../../mysqldb','setMaxListeners','emit','hasOwnProperty'];(function(_0x20d4e7,_0x5f29f7){var _0x125131=function(_0x10dc57){while(--_0x10dc57){_0x20d4e7['push'](_0x20d4e7['shift']());}};_0x125131(++_0x5f29f7);}(_0x4f3f,0x18a));var _0xf4f3=function(_0x400fe3,_0x4a3edc){_0x400fe3=_0x400fe3-0x0;var _0x33f3ec=_0x4f3f[_0x400fe3];return _0x33f3ec;};'use strict';var EventEmitter=require(_0xf4f3('0x0'));var MailSubstatus=require(_0xf4f3('0x1'))['db']['MailSubstatus'];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xf4f3('0x2')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x46053a){return function(_0x2847d5,_0x51521b,_0xcfa16d){MailSubstatusEvents['emit'](_0x46053a+':'+_0x2847d5['id'],_0x2847d5);MailSubstatusEvents[_0xf4f3('0x3')](_0x46053a,_0x2847d5);_0xcfa16d(null);};}for(var e in events){if(events[_0xf4f3('0x4')](e)){var event=events[e];MailSubstatus[_0xf4f3('0x5')](e,emitEvent(event));}}module[_0xf4f3('0x6')]=MailSubstatusEvents;