2d5859906bcff9f71cb61905aac2a3e67bbc0809
[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 _0xe49a=['hook','exports','events','MailSubstatus','setMaxListeners','update','emit'];(function(_0x2a86ac,_0x4ddba6){var _0x51ee24=function(_0x177e1b){while(--_0x177e1b){_0x2a86ac['push'](_0x2a86ac['shift']());}};_0x51ee24(++_0x4ddba6);}(_0xe49a,0x198));var _0xae49=function(_0xf06163,_0x80c74b){_0xf06163=_0xf06163-0x0;var _0x29df4d=_0xe49a[_0xf06163];return _0x29df4d;};'use strict';var EventEmitter=require(_0xae49('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0xae49('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xae49('0x2')](0x0);var events={'afterUpdate':_0xae49('0x3')};function emitEvent(_0x17bd57){return function(_0x5b6319,_0x4c10b5,_0x359449){MailSubstatusEvents[_0xae49('0x4')](_0x17bd57+':'+_0x5b6319['id'],_0x5b6319);MailSubstatusEvents[_0xae49('0x4')](_0x17bd57,_0x5b6319);_0x359449(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0xae49('0x5')](e,emitEvent(event));}}module[_0xae49('0x6')]=MailSubstatusEvents;