Built motion from commit (unavailable).|2.5.12
[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 _0xe0cc=['exports','events','../../mysqldb','ChatInternalMessage','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x494315,_0x2d42bd){var _0x49cc18=function(_0x419de9){while(--_0x419de9){_0x494315['push'](_0x494315['shift']());}};_0x49cc18(++_0x2d42bd);}(_0xe0cc,0x1cd));var _0xce0c=function(_0x3834ba,_0x20d3d2){_0x3834ba=_0x3834ba-0x0;var _0x20e6e5=_0xe0cc[_0x3834ba];return _0x20e6e5;};'use strict';var EventEmitter=require(_0xce0c('0x0'));var ChatInternalMessage=require(_0xce0c('0x1'))['db'][_0xce0c('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xce0c('0x3'),'afterUpdate':_0xce0c('0x4'),'afterDestroy':_0xce0c('0x5')};function emitEvent(_0x1c0285){return function(_0x3db638,_0xf8fcb7,_0x35410e){ChatInternalMessageEvents[_0xce0c('0x6')](_0x1c0285+':'+_0x3db638['id'],_0x3db638);ChatInternalMessageEvents[_0xce0c('0x6')](_0x1c0285,_0x3db638);_0x35410e(null);};}for(var e in events){if(events[_0xce0c('0x7')](e)){var event=events[e];ChatInternalMessage[_0xce0c('0x8')](e,emitEvent(event));}}module[_0xce0c('0x9')]=ChatInternalMessageEvents;