b566b2168f9b0a56a9292a87f5df26a490b8bd0c
[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 _0xcccf=['emit','hasOwnProperty','exports','../../mysqldb','MailSubstatus','setMaxListeners'];(function(_0x4569db,_0x5da792){var _0x5d1dfd=function(_0x1081cf){while(--_0x1081cf){_0x4569db['push'](_0x4569db['shift']());}};_0x5d1dfd(++_0x5da792);}(_0xcccf,0x1ad));var _0xfccc=function(_0x41c2fc,_0x3a12b6){_0x41c2fc=_0x41c2fc-0x0;var _0x1a9334=_0xcccf[_0x41c2fc];return _0x1a9334;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0xfccc('0x0'))['db'][_0xfccc('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xfccc('0x2')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x4b3f61){return function(_0x94443d,_0x5e9cbb,_0xf26470){MailSubstatusEvents[_0xfccc('0x3')](_0x4b3f61+':'+_0x94443d['id'],_0x94443d);MailSubstatusEvents[_0xfccc('0x3')](_0x4b3f61,_0x94443d);_0xf26470(null);};}for(var e in events){if(events[_0xfccc('0x4')](e)){var event=events[e];MailSubstatus['hook'](e,emitEvent(event));}}module[_0xfccc('0x5')]=MailSubstatusEvents;