Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / chatMessage / chatMessage.events.js
index 71be2f0..6e094e3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4612=['exports','events','../../mysqldb','ChatMessage','setMaxListeners','save','update','remove','emit','hook'];(function(_0x2f6a16,_0x5e9f00){var _0x32e370=function(_0x2b0850){while(--_0x2b0850){_0x2f6a16['push'](_0x2f6a16['shift']());}};_0x32e370(++_0x5e9f00);}(_0x4612,0x17d));var _0x2461=function(_0x139a3c,_0x4fc883){_0x139a3c=_0x139a3c-0x0;var _0x2b375b=_0x4612[_0x139a3c];return _0x2b375b;};'use strict';var EventEmitter=require(_0x2461('0x0'));var ChatMessage=require(_0x2461('0x1'))['db'][_0x2461('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x2461('0x3')](0x0);var events={'afterCreate':_0x2461('0x4'),'afterUpdate':_0x2461('0x5'),'afterDestroy':_0x2461('0x6')};function emitEvent(_0xebcfc2){return function(_0x3b53d6,_0x359cfe,_0x454aff){ChatMessageEvents['emit'](_0xebcfc2+':'+_0x3b53d6['id'],_0x3b53d6);ChatMessageEvents[_0x2461('0x7')](_0xebcfc2,_0x3b53d6);_0x454aff(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatMessage[_0x2461('0x8')](e,emitEvent(event));}}module[_0x2461('0x9')]=ChatMessageEvents;
\ No newline at end of file
+var _0x953f=['events','../../mysqldb','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports'];(function(_0xcfeff4,_0x3f2e19){var _0xb2fadc=function(_0x4cd013){while(--_0x4cd013){_0xcfeff4['push'](_0xcfeff4['shift']());}};_0xb2fadc(++_0x3f2e19);}(_0x953f,0x1b0));var _0xf953=function(_0x1e4360,_0x930b9b){_0x1e4360=_0x1e4360-0x0;var _0x31e6b4=_0x953f[_0x1e4360];return _0x31e6b4;};'use strict';var EventEmitter=require(_0xf953('0x0'));var ChatMessage=require(_0xf953('0x1'))['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xf953('0x2')](0x0);var events={'afterCreate':_0xf953('0x3'),'afterUpdate':_0xf953('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4e5502){return function(_0x90f090,_0x3bc85c,_0x1c9714){ChatMessageEvents[_0xf953('0x5')](_0x4e5502+':'+_0x90f090['id'],_0x90f090);ChatMessageEvents[_0xf953('0x5')](_0x4e5502,_0x90f090);_0x1c9714(null);};}for(var e in events){if(events[_0xf953('0x6')](e)){var event=events[e];ChatMessage[_0xf953('0x7')](e,emitEvent(event));}}module[_0xf953('0x8')]=ChatMessageEvents;
\ No newline at end of file