Built motion from commit 994c64e1.|2.6.1
[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 _0x2d30=['emit','hasOwnProperty','hook','exports','../../mysqldb','MailSubstatus','setMaxListeners','update'];(function(_0x57ce45,_0x5b808d){var _0xd386c9=function(_0x31bce4){while(--_0x31bce4){_0x57ce45['push'](_0x57ce45['shift']());}};_0xd386c9(++_0x5b808d);}(_0x2d30,0x124));var _0x02d3=function(_0x45977c,_0x7eaed0){_0x45977c=_0x45977c-0x0;var _0x399413=_0x2d30[_0x45977c];return _0x399413;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0x02d3('0x0'))['db'][_0x02d3('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x02d3('0x2')](0x0);var events={'afterUpdate':_0x02d3('0x3')};function emitEvent(_0x39672e){return function(_0x5a2bc2,_0x53e60a,_0x56515c){MailSubstatusEvents[_0x02d3('0x4')](_0x39672e+':'+_0x5a2bc2['id'],_0x5a2bc2);MailSubstatusEvents[_0x02d3('0x4')](_0x39672e,_0x5a2bc2);_0x56515c(null);};}for(var e in events){if(events[_0x02d3('0x5')](e)){var event=events[e];MailSubstatus[_0x02d3('0x6')](e,emitEvent(event));}}module[_0x02d3('0x7')]=MailSubstatusEvents;