Built motion from commit 753c950e.|2.5.42
[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 _0xf59d=['hook','exports','events','../../mysqldb','MailSubstatus','setMaxListeners','update','emit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf59d,0x142));var _0xdf59=function(_0x261c5a,_0x1c2dfa){_0x261c5a=_0x261c5a-0x0;var _0x4d8c6c=_0xf59d[_0x261c5a];return _0x4d8c6c;};'use strict';var EventEmitter=require(_0xdf59('0x0'));var MailSubstatus=require(_0xdf59('0x1'))['db'][_0xdf59('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xdf59('0x3')](0x0);var events={'afterUpdate':_0xdf59('0x4')};function emitEvent(_0x2bc04a){return function(_0x463969,_0x2801d6,_0x5de5b9){MailSubstatusEvents['emit'](_0x2bc04a+':'+_0x463969['id'],_0x463969);MailSubstatusEvents[_0xdf59('0x5')](_0x2bc04a,_0x463969);_0x5de5b9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0xdf59('0x6')](e,emitEvent(event));}}module[_0xdf59('0x7')]=MailSubstatusEvents;