Built motion from commit ce9a7520.|2.5.39
[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 _0x6794=['events','../../mysqldb','setMaxListeners','update','emit','hasOwnProperty','hook','exports'];(function(_0x57752a,_0x50a8d8){var _0x2ac645=function(_0x3ba824){while(--_0x3ba824){_0x57752a['push'](_0x57752a['shift']());}};_0x2ac645(++_0x50a8d8);}(_0x6794,0xd8));var _0x4679=function(_0x479eff,_0x69421a){_0x479eff=_0x479eff-0x0;var _0x170e50=_0x6794[_0x479eff];return _0x170e50;};'use strict';var EventEmitter=require(_0x4679('0x0'));var MailSubstatus=require(_0x4679('0x1'))['db']['MailSubstatus'];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x4679('0x2')](0x0);var events={'afterUpdate':_0x4679('0x3')};function emitEvent(_0x40344f){return function(_0x52c3f4,_0x33b5f3,_0x2b7a60){MailSubstatusEvents[_0x4679('0x4')](_0x40344f+':'+_0x52c3f4['id'],_0x52c3f4);MailSubstatusEvents[_0x4679('0x4')](_0x40344f,_0x52c3f4);_0x2b7a60(null);};}for(var e in events){if(events[_0x4679('0x5')](e)){var event=events[e];MailSubstatus[_0x4679('0x6')](e,emitEvent(event));}}module[_0x4679('0x7')]=MailSubstatusEvents;