869e2e24a1226f71214d9f6321e4c1f3b6d46906
[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 _0x8d55=['update','emit','hook','exports','MailSubstatus'];(function(_0x18b628,_0x32c843){var _0x48b2b9=function(_0x4e0b18){while(--_0x4e0b18){_0x18b628['push'](_0x18b628['shift']());}};_0x48b2b9(++_0x32c843);}(_0x8d55,0x1a8));var _0x58d5=function(_0x592933,_0x2c05d5){_0x592933=_0x592933-0x0;var _0x4aef2c=_0x8d55[_0x592933];return _0x4aef2c;};'use strict';var EventEmitter=require('events');var MailSubstatus=require('../../mysqldb')['db'][_0x58d5('0x0')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents['setMaxListeners'](0x0);var events={'afterUpdate':_0x58d5('0x1')};function emitEvent(_0x356aec){return function(_0x8721ee,_0x5bb8b7,_0x299132){MailSubstatusEvents[_0x58d5('0x2')](_0x356aec+':'+_0x8721ee['id'],_0x8721ee);MailSubstatusEvents[_0x58d5('0x2')](_0x356aec,_0x8721ee);_0x299132(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x58d5('0x3')](e,emitEvent(event));}}module[_0x58d5('0x4')]=MailSubstatusEvents;