fa5ed88f6b641bce352861292df48cce108bca0b
[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 _0x9a94=['events','MailSubstatus','emit','hasOwnProperty','hook'];(function(_0x147582,_0x4e37fc){var _0x28bf97=function(_0x5b6157){while(--_0x5b6157){_0x147582['push'](_0x147582['shift']());}};_0x28bf97(++_0x4e37fc);}(_0x9a94,0x12c));var _0x49a9=function(_0x4f4757,_0x44241a){_0x4f4757=_0x4f4757-0x0;var _0x549c37=_0x9a94[_0x4f4757];return _0x549c37;};'use strict';var EventEmitter=require(_0x49a9('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0x49a9('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents['setMaxListeners'](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x1ac766){return function(_0x4f8deb,_0x159e6a,_0x8e5843){MailSubstatusEvents[_0x49a9('0x2')](_0x1ac766+':'+_0x4f8deb['id'],_0x4f8deb);MailSubstatusEvents['emit'](_0x1ac766,_0x4f8deb);_0x8e5843(null);};}for(var e in events){if(events[_0x49a9('0x3')](e)){var event=events[e];MailSubstatus[_0x49a9('0x4')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;