Built motion from commit 52c8a02d.|2.6.29
[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 _0x2817=['MailSubstatus','setMaxListeners','update','emit','hasOwnProperty','hook'];(function(_0x362733,_0x46e9fa){var _0x4fccca=function(_0x57289e){while(--_0x57289e){_0x362733['push'](_0x362733['shift']());}};_0x4fccca(++_0x46e9fa);}(_0x2817,0x16e));var _0x7281=function(_0x47f122,_0x215017){_0x47f122=_0x47f122-0x0;var _0x2a0054=_0x2817[_0x47f122];return _0x2a0054;};'use strict';var EventEmitter=require('events');var MailSubstatus=require('../../mysqldb')['db'][_0x7281('0x0')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x7281('0x1')](0x0);var events={'afterUpdate':_0x7281('0x2')};function emitEvent(_0x5e10e6){return function(_0x24fc5d,_0x2f1cb4,_0x1e2a6d){MailSubstatusEvents['emit'](_0x5e10e6+':'+_0x24fc5d['id'],_0x24fc5d);MailSubstatusEvents[_0x7281('0x3')](_0x5e10e6,_0x24fc5d);_0x1e2a6d(null);};}for(var e in events){if(events[_0x7281('0x4')](e)){var event=events[e];MailSubstatus[_0x7281('0x5')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;