ae6a72ec9c50157e37757526af7b1fb7ec3ab0d2
[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 _0xbf43=['events','MailSubstatus','setMaxListeners','update','emit','hook'];(function(_0x18a79d,_0x57bd2c){var _0x4f8848=function(_0x28af80){while(--_0x28af80){_0x18a79d['push'](_0x18a79d['shift']());}};_0x4f8848(++_0x57bd2c);}(_0xbf43,0x7e));var _0x3bf4=function(_0x36dac9,_0xe1819a){_0x36dac9=_0x36dac9-0x0;var _0x48613b=_0xbf43[_0x36dac9];return _0x48613b;};'use strict';var EventEmitter=require(_0x3bf4('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0x3bf4('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x3bf4('0x2')](0x0);var events={'afterUpdate':_0x3bf4('0x3')};function emitEvent(_0x205cf0){return function(_0x39da62,_0x3a6e92,_0x220ea0){MailSubstatusEvents[_0x3bf4('0x4')](_0x205cf0+':'+_0x39da62['id'],_0x39da62);MailSubstatusEvents[_0x3bf4('0x4')](_0x205cf0,_0x39da62);_0x220ea0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x3bf4('0x5')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;