6d4ec6a4322f4b8fe384b96c2a743339ce6ddb51
[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 _0xef49=['setMaxListeners','update','emit','hasOwnProperty','hook','exports','../../mysqldb','MailSubstatus'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0xef49,0xbe));var _0x9ef4=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0xef49[_0x1d1779];return _0x2377e9;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0x9ef4('0x0'))['db'][_0x9ef4('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x9ef4('0x2')](0x0);var events={'afterUpdate':_0x9ef4('0x3')};function emitEvent(_0x3a9e96){return function(_0x41d279,_0x6deb0c,_0x8b03fd){MailSubstatusEvents[_0x9ef4('0x4')](_0x3a9e96+':'+_0x41d279['id'],_0x41d279);MailSubstatusEvents[_0x9ef4('0x4')](_0x3a9e96,_0x41d279);_0x8b03fd(null);};}for(var e in events){if(events[_0x9ef4('0x5')](e)){var event=events[e];MailSubstatus[_0x9ef4('0x6')](e,emitEvent(event));}}module[_0x9ef4('0x7')]=MailSubstatusEvents;