Built motion from commit 9d1906d1.|2.5.40
[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 _0xe5ef=['exports','events','MailSubstatus','setMaxListeners','emit','hasOwnProperty'];(function(_0x5676d3,_0x582062){var _0x573736=function(_0x3760bc){while(--_0x3760bc){_0x5676d3['push'](_0x5676d3['shift']());}};_0x573736(++_0x582062);}(_0xe5ef,0x1bd));var _0xfe5e=function(_0x190404,_0x594195){_0x190404=_0x190404-0x0;var _0x7b180c=_0xe5ef[_0x190404];return _0x7b180c;};'use strict';var EventEmitter=require(_0xfe5e('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0xfe5e('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xfe5e('0x2')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x2a8403){return function(_0x441191,_0x8a8da1,_0x131e98){MailSubstatusEvents[_0xfe5e('0x3')](_0x2a8403+':'+_0x441191['id'],_0x441191);MailSubstatusEvents['emit'](_0x2a8403,_0x441191);_0x131e98(null);};}for(var e in events){if(events[_0xfe5e('0x4')](e)){var event=events[e];MailSubstatus['hook'](e,emitEvent(event));}}module[_0xfe5e('0x5')]=MailSubstatusEvents;