Built motion from commit fe909640.|2.6.8
[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 _0x2c3a=['hasOwnProperty','hook','exports','events','MailSubstatus','setMaxListeners','emit'];(function(_0x40f9cf,_0x4ad7f9){var _0xdec7cb=function(_0x14511b){while(--_0x14511b){_0x40f9cf['push'](_0x40f9cf['shift']());}};_0xdec7cb(++_0x4ad7f9);}(_0x2c3a,0x1ed));var _0xa2c3=function(_0x8e3c59,_0x529e0d){_0x8e3c59=_0x8e3c59-0x0;var _0x4af10c=_0x2c3a[_0x8e3c59];return _0x4af10c;};'use strict';var EventEmitter=require(_0xa2c3('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0xa2c3('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xa2c3('0x2')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x204001){return function(_0x1365da,_0x1ee484,_0xb17881){MailSubstatusEvents['emit'](_0x204001+':'+_0x1365da['id'],_0x1365da);MailSubstatusEvents[_0xa2c3('0x3')](_0x204001,_0x1365da);_0xb17881(null);};}for(var e in events){if(events[_0xa2c3('0x4')](e)){var event=events[e];MailSubstatus[_0xa2c3('0x5')](e,emitEvent(event));}}module[_0xa2c3('0x6')]=MailSubstatusEvents;