Built motion from commit d5e4af8c.|2.6.23
[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 _0xc7b2=['setMaxListeners','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x4e0be5,_0x462d7a){var _0x4c96b3=function(_0x49af0e){while(--_0x49af0e){_0x4e0be5['push'](_0x4e0be5['shift']());}};_0x4c96b3(++_0x462d7a);}(_0xc7b2,0x100));var _0x2c7b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc7b2[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x2c7b('0x0'));var MailSubstatus=require(_0x2c7b('0x1'))['db']['MailSubstatus'];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x2c7b('0x2')](0x0);var events={'afterUpdate':'update'};function emitEvent(_0x2fcaa9){return function(_0x476dc3,_0x542bc8,_0x2d477e){MailSubstatusEvents[_0x2c7b('0x3')](_0x2fcaa9+':'+_0x476dc3['id'],_0x476dc3);MailSubstatusEvents[_0x2c7b('0x3')](_0x2fcaa9,_0x476dc3);_0x2d477e(null);};}for(var e in events){if(events[_0x2c7b('0x4')](e)){var event=events[e];MailSubstatus[_0x2c7b('0x5')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;