Built motion from commit 47436d59.|2.6.7
[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 _0xb3ab=['hasOwnProperty','hook','MailSubstatus','setMaxListeners','update','emit'];(function(_0x3f021a,_0x2c8463){var _0x61fce8=function(_0x56316a){while(--_0x56316a){_0x3f021a['push'](_0x3f021a['shift']());}};_0x61fce8(++_0x2c8463);}(_0xb3ab,0x1ca));var _0xbb3a=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0xb3ab[_0x1d9aa0];return _0x226868;};'use strict';var EventEmitter=require('events');var MailSubstatus=require('../../mysqldb')['db'][_0xbb3a('0x0')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xbb3a('0x1')](0x0);var events={'afterUpdate':_0xbb3a('0x2')};function emitEvent(_0x2eb73a){return function(_0x45143a,_0x3543df,_0x7cd907){MailSubstatusEvents[_0xbb3a('0x3')](_0x2eb73a+':'+_0x45143a['id'],_0x45143a);MailSubstatusEvents['emit'](_0x2eb73a,_0x45143a);_0x7cd907(null);};}for(var e in events){if(events[_0xbb3a('0x4')](e)){var event=events[e];MailSubstatus[_0xbb3a('0x5')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;