Built motion from commit (unavailable).|2.5.3
[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 _0xfd2f=['exports','events','../../mysqldb','ChatInternalMessage','save','remove','hook'];(function(_0x58b802,_0x442feb){var _0x38e03e=function(_0x472013){while(--_0x472013){_0x58b802['push'](_0x58b802['shift']());}};_0x38e03e(++_0x442feb);}(_0xfd2f,0x14a));var _0xffd2=function(_0x2e536f,_0x5f1c06){_0x2e536f=_0x2e536f-0x0;var _0x1ab12b=_0xfd2f[_0x2e536f];return _0x1ab12b;};'use strict';var EventEmitter=require(_0xffd2('0x0'));var ChatInternalMessage=require(_0xffd2('0x1'))['db'][_0xffd2('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xffd2('0x3'),'afterUpdate':'update','afterDestroy':_0xffd2('0x4')};function emitEvent(_0x407d4b){return function(_0x492c33,_0x983987,_0x22c424){ChatInternalMessageEvents['emit'](_0x407d4b+':'+_0x492c33['id'],_0x492c33);ChatInternalMessageEvents['emit'](_0x407d4b,_0x492c33);_0x22c424(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage[_0xffd2('0x5')](e,emitEvent(event));}}module[_0xffd2('0x6')]=ChatInternalMessageEvents;