Built motion from commit 0900f080.|2.5.45
[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 _0x29c5=['setMaxListeners','emit','hook','exports','events','../../mysqldb','MailSubstatus'];(function(_0x3aca8a,_0x20c80c){var _0x4e3e53=function(_0x329ac1){while(--_0x329ac1){_0x3aca8a['push'](_0x3aca8a['shift']());}};_0x4e3e53(++_0x20c80c);}(_0x29c5,0xc8));var _0x529c=function(_0x1312e7,_0x5410bc){_0x1312e7=_0x1312e7-0x0;var _0x39fcbc=_0x29c5[_0x1312e7];return _0x39fcbc;};'use strict';var EventEmitter=require(_0x529c('0x0'));var MailSubstatus=require(_0x529c('0x1'))['db'][_0x529c('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x529c('0x3')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x444139){return function(_0x5a528b,_0x2a42ee,_0x595447){MailSubstatusEvents[_0x529c('0x4')](_0x444139+':'+_0x5a528b['id'],_0x5a528b);MailSubstatusEvents[_0x529c('0x4')](_0x444139,_0x5a528b);_0x595447(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x529c('0x5')](e,emitEvent(event));}}module[_0x529c('0x6')]=MailSubstatusEvents;