06a19b9267c4b038a17d445041c9ce25e8718093
[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 _0x5b4d=['hasOwnProperty','hook','events','../../mysqldb','update','emit'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x5b4d,0x1d6));var _0xd5b4=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x5b4d[_0x19e35c];return _0x3e1fe8;};'use strict';var EventEmitter=require(_0xd5b4('0x0'));var MailSubstatus=require(_0xd5b4('0x1'))['db']['MailSubstatus'];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents['setMaxListeners'](0x0);var events={'afterUpdate':_0xd5b4('0x2')};function emitEvent(_0xbe0df1){return function(_0x546a8e,_0x1f1708,_0x5805fe){MailSubstatusEvents[_0xd5b4('0x3')](_0xbe0df1+':'+_0x546a8e['id'],_0x546a8e);MailSubstatusEvents[_0xd5b4('0x3')](_0xbe0df1,_0x546a8e);_0x5805fe(null);};}for(var e in events){if(events[_0xd5b4('0x4')](e)){var event=events[e];MailSubstatus[_0xd5b4('0x5')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;