Built motion from commit 9d0783e6.|2.6.13
[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 _0x9e6e=['events','../../mysqldb','MailSubstatus','setMaxListeners','emit','hasOwnProperty','hook','exports'];(function(_0x179b53,_0x31f6fe){var _0x38a146=function(_0x33f0c2){while(--_0x33f0c2){_0x179b53['push'](_0x179b53['shift']());}};_0x38a146(++_0x31f6fe);}(_0x9e6e,0xf8));var _0xe9e6=function(_0x46307f,_0x55db2f){_0x46307f=_0x46307f-0x0;var _0x5a3320=_0x9e6e[_0x46307f];return _0x5a3320;};'use strict';var EventEmitter=require(_0xe9e6('0x0'));var MailSubstatus=require(_0xe9e6('0x1'))['db'][_0xe9e6('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xe9e6('0x3')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x33a46){return function(_0x3859f3,_0x51988d,_0xc4e872){MailSubstatusEvents[_0xe9e6('0x4')](_0x33a46+':'+_0x3859f3['id'],_0x3859f3);MailSubstatusEvents['emit'](_0x33a46,_0x3859f3);_0xc4e872(null);};}for(var e in events){if(events[_0xe9e6('0x5')](e)){var event=events[e];MailSubstatus[_0xe9e6('0x6')](e,emitEvent(event));}}module[_0xe9e6('0x7')]=MailSubstatusEvents;