Built motion from commit 3c2ce842.|2.6.31
[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 _0x54e2=['../../mysqldb','MailSubstatus','setMaxListeners','update','emit','hasOwnProperty','exports'];(function(_0x31aa26,_0x6571f5){var _0x23764e=function(_0x2f040c){while(--_0x2f040c){_0x31aa26['push'](_0x31aa26['shift']());}};_0x23764e(++_0x6571f5);}(_0x54e2,0x11f));var _0x254e=function(_0x12dd0e,_0x288e21){_0x12dd0e=_0x12dd0e-0x0;var _0x340f7d=_0x54e2[_0x12dd0e];return _0x340f7d;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0x254e('0x0'))['db'][_0x254e('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x254e('0x2')](0x0);var events={'afterUpdate':_0x254e('0x3')};function emitEvent(_0x81a458){return function(_0x1f1ebd,_0x352f02,_0x34709b){MailSubstatusEvents[_0x254e('0x4')](_0x81a458+':'+_0x1f1ebd['id'],_0x1f1ebd);MailSubstatusEvents[_0x254e('0x4')](_0x81a458,_0x1f1ebd);_0x34709b(null);};}for(var e in events){if(events[_0x254e('0x5')](e)){var event=events[e];MailSubstatus['hook'](e,emitEvent(event));}}module[_0x254e('0x6')]=MailSubstatusEvents;