Built motion from commit efa66e19.|2.6.22
[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 _0x52e6=['update','emit','exports','events','../../mysqldb','MailSubstatus','setMaxListeners'];(function(_0x822fb9,_0x3fc565){var _0x13f715=function(_0x35e222){while(--_0x35e222){_0x822fb9['push'](_0x822fb9['shift']());}};_0x13f715(++_0x3fc565);}(_0x52e6,0x153));var _0x652e=function(_0x1e724a,_0x20e0c3){_0x1e724a=_0x1e724a-0x0;var _0x877058=_0x52e6[_0x1e724a];return _0x877058;};'use strict';var EventEmitter=require(_0x652e('0x0'));var MailSubstatus=require(_0x652e('0x1'))['db'][_0x652e('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x652e('0x3')](0x0);var events={'afterUpdate':_0x652e('0x4')};function emitEvent(_0x164f79){return function(_0x26ae3d,_0x1a4db0,_0x4932a9){MailSubstatusEvents[_0x652e('0x5')](_0x164f79+':'+_0x26ae3d['id'],_0x26ae3d);MailSubstatusEvents[_0x652e('0x5')](_0x164f79,_0x26ae3d);_0x4932a9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus['hook'](e,emitEvent(event));}}module[_0x652e('0x6')]=MailSubstatusEvents;