Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / api / chatInternalMessage / chatInternalMessage.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 _0x9c15=['update','remove','emit','hook','events','../../mysqldb','ChatInternalMessage','save'];(function(_0x32a0ef,_0x3c8e78){var _0x556436=function(_0x36002c){while(--_0x36002c){_0x32a0ef['push'](_0x32a0ef['shift']());}};_0x556436(++_0x3c8e78);}(_0x9c15,0x7c));var _0x59c1=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x9c15[_0x126558];return _0x1f6d14;};'use strict';var EventEmitter=require(_0x59c1('0x0'));var ChatInternalMessage=require(_0x59c1('0x1'))['db'][_0x59c1('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x59c1('0x3'),'afterUpdate':_0x59c1('0x4'),'afterDestroy':_0x59c1('0x5')};function emitEvent(_0x4c256e){return function(_0x5e1c52,_0x3961ee,_0x2c25c8){ChatInternalMessageEvents[_0x59c1('0x6')](_0x4c256e+':'+_0x5e1c52['id'],_0x5e1c52);ChatInternalMessageEvents[_0x59c1('0x6')](_0x4c256e,_0x5e1c52);_0x2c25c8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage[_0x59c1('0x7')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents;