Built motion from commit ae138b72.|2.6.28
[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 _0xcb44=['exports','events','../../mysqldb','MailSubstatus','setMaxListeners','update','emit','hook'];(function(_0x48bcb0,_0x3ba74b){var _0x37232c=function(_0x159906){while(--_0x159906){_0x48bcb0['push'](_0x48bcb0['shift']());}};_0x37232c(++_0x3ba74b);}(_0xcb44,0x89));var _0x4cb4=function(_0x3bb43c,_0x5e18f3){_0x3bb43c=_0x3bb43c-0x0;var _0x1c5bf9=_0xcb44[_0x3bb43c];return _0x1c5bf9;};'use strict';var EventEmitter=require(_0x4cb4('0x0'));var MailSubstatus=require(_0x4cb4('0x1'))['db'][_0x4cb4('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x4cb4('0x3')](0x0);var events={'afterUpdate':_0x4cb4('0x4')};function emitEvent(_0x273fb9){return function(_0x4b7f69,_0x544d77,_0x780eea){MailSubstatusEvents[_0x4cb4('0x5')](_0x273fb9+':'+_0x4b7f69['id'],_0x4b7f69);MailSubstatusEvents[_0x4cb4('0x5')](_0x273fb9,_0x4b7f69);_0x780eea(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x4cb4('0x6')](e,emitEvent(event));}}module[_0x4cb4('0x7')]=MailSubstatusEvents;