Built motion from commit d5e4af8c.|2.6.23
[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 _0xb0bd=['events','../../mysqldb','MailSubstatus','setMaxListeners','update','emit','hasOwnProperty'];(function(_0x549917,_0x4ffe64){var _0x25a6c6=function(_0xb44a74){while(--_0xb44a74){_0x549917['push'](_0x549917['shift']());}};_0x25a6c6(++_0x4ffe64);}(_0xb0bd,0xb6));var _0xdb0b=function(_0x12c5a1,_0x2f813f){_0x12c5a1=_0x12c5a1-0x0;var _0x459852=_0xb0bd[_0x12c5a1];return _0x459852;};'use strict';var EventEmitter=require(_0xdb0b('0x0'));var MailSubstatus=require(_0xdb0b('0x1'))['db'][_0xdb0b('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0xdb0b('0x3')](0x0);var events={'afterUpdate':_0xdb0b('0x4')};function emitEvent(_0xa46eb){return function(_0x1ef1d3,_0x55bba2,_0x752e52){MailSubstatusEvents[_0xdb0b('0x5')](_0xa46eb+':'+_0x1ef1d3['id'],_0x1ef1d3);MailSubstatusEvents[_0xdb0b('0x5')](_0xa46eb,_0x1ef1d3);_0x752e52(null);};}for(var e in events){if(events[_0xdb0b('0x6')](e)){var event=events[e];MailSubstatus['hook'](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;