Built motion from commit 87cd5f02.|2.5.48
[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 _0xf517=['exports','../../mysqldb','MailSubstatus','update','emit','hook'];(function(_0x3c4aea,_0x550dcb){var _0x3d005a=function(_0x1c79ba){while(--_0x1c79ba){_0x3c4aea['push'](_0x3c4aea['shift']());}};_0x3d005a(++_0x550dcb);}(_0xf517,0xfd));var _0x7f51=function(_0x48d50c,_0x59b2ae){_0x48d50c=_0x48d50c-0x0;var _0x126e82=_0xf517[_0x48d50c];return _0x126e82;};'use strict';var EventEmitter=require('events');var MailSubstatus=require(_0x7f51('0x0'))['db'][_0x7f51('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents['setMaxListeners'](0x0);var events={'afterUpdate':_0x7f51('0x2')};function emitEvent(_0x15c39f){return function(_0x407f5e,_0x1c3bb7,_0x4fae78){MailSubstatusEvents[_0x7f51('0x3')](_0x15c39f+':'+_0x407f5e['id'],_0x407f5e);MailSubstatusEvents[_0x7f51('0x3')](_0x15c39f,_0x407f5e);_0x4fae78(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x7f51('0x4')](e,emitEvent(event));}}module[_0x7f51('0x5')]=MailSubstatusEvents;