61f814e52b7a584bf1926d02140dc240d4ed9f71
[motion2.git] / server / api / mailSubstatus / mailSubstatus.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xcbdf=['emit','hook','exports','MailSubstatus','setMaxListeners','update'];(function(_0x1dcea7,_0x559e8a){var _0x16c4a2=function(_0x65ad95){while(--_0x65ad95){_0x1dcea7['push'](_0x1dcea7['shift']());}};_0x16c4a2(++_0x559e8a);}(_0xcbdf,0x165));var _0xfcbd=function(_0x89ec39,_0x74a3ca){_0x89ec39=_0x89ec39-0x0;var _0x2cfeac=_0xcbdf[_0x89ec39];return _0x2cfeac;};'use strict';var EventEmitter=require('events');var MailSubstatus=require('../../mysqldb')['db'][_0xfcbd('0x0')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xfcbd('0x1')](0x0);var events={'afterUpdate':_0xfcbd('0x2')};function emitEvent(_0x499fd7){return function(_0x45f92e,_0x513c1f,_0xa1972){MailSubstatusEvents[_0xfcbd('0x3')](_0x499fd7+':'+_0x45f92e['id'],_0x45f92e);MailSubstatusEvents['emit'](_0x499fd7,_0x45f92e);_0xa1972(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0xfcbd('0x4')](e,emitEvent(event));}}module[_0xfcbd('0x5')]=MailSubstatusEvents;