70f8e766c3d8c06bc3c06289820aefcab7a67ad1
[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 _0x03c0=['hook','exports','events','../../mysqldb','setMaxListeners','update','emit','hasOwnProperty'];(function(_0x3096c8,_0x4cf94c){var _0x4cb984=function(_0x5a1efc){while(--_0x5a1efc){_0x3096c8['push'](_0x3096c8['shift']());}};_0x4cb984(++_0x4cf94c);}(_0x03c0,0x6a));var _0x003c=function(_0x489e3b,_0x4728af){_0x489e3b=_0x489e3b-0x0;var _0x32b6cc=_0x03c0[_0x489e3b];return _0x32b6cc;};'use strict';var EventEmitter=require(_0x003c('0x0'));var MailSubstatus=require(_0x003c('0x1'))['db']['MailSubstatus'];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x003c('0x2')](0x0);var events={'afterUpdate':_0x003c('0x3')};function emitEvent(_0x280924){return function(_0x137f99,_0xe34621,_0x21dc8c){MailSubstatusEvents[_0x003c('0x4')](_0x280924+':'+_0x137f99['id'],_0x137f99);MailSubstatusEvents['emit'](_0x280924,_0x137f99);_0x21dc8c(null);};}for(var e in events){if(events[_0x003c('0x5')](e)){var event=events[e];MailSubstatus[_0x003c('0x6')](e,emitEvent(event));}}module[_0x003c('0x7')]=MailSubstatusEvents;