Built motion from commit (unavailable).|2.5.4
[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 _0xac22=['save','update','remove','emit','hasOwnProperty','hook','../../mysqldb','ChatInternalMessage','setMaxListeners'];(function(_0x5ab340,_0x3bf3e4){var _0x2ed5b7=function(_0x3178f9){while(--_0x3178f9){_0x5ab340['push'](_0x5ab340['shift']());}};_0x2ed5b7(++_0x3bf3e4);}(_0xac22,0x138));var _0x2ac2=function(_0xedb2da,_0x155f02){_0xedb2da=_0xedb2da-0x0;var _0x5029d1=_0xac22[_0xedb2da];return _0x5029d1;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require(_0x2ac2('0x0'))['db'][_0x2ac2('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x2ac2('0x2')](0x0);var events={'afterCreate':_0x2ac2('0x3'),'afterUpdate':_0x2ac2('0x4'),'afterDestroy':_0x2ac2('0x5')};function emitEvent(_0x186380){return function(_0x569df4,_0x37ea79,_0xc88ac2){ChatInternalMessageEvents[_0x2ac2('0x6')](_0x186380+':'+_0x569df4['id'],_0x569df4);ChatInternalMessageEvents['emit'](_0x186380,_0x569df4);_0xc88ac2(null);};}for(var e in events){if(events[_0x2ac2('0x7')](e)){var event=events[e];ChatInternalMessage[_0x2ac2('0x8')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents;