Built motion from commit ee17993.|1.0.6
[motion.git] / server / api / chat_message / chat_message.socket.js
1 var _0x5709=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x49\x64","\x66\x69\x6E\x64","\x75\x73\x65\x72\x49\x64","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x65\x72\x67\x65","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x75\x73\x65\x72\x70\x69\x63","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5709[0];const _=require(_0x5709[1]);const ChatMessage=require(_0x5709[3])[_0x5709[2]];const ChatMessageEvents=require(_0x5709[4]);var events=[_0x5709[5],_0x5709[6]];exports[_0x5709[7]]= function(_0x31e2x5){for(var _0x31e2x6=0,_0x31e2x7=events[_0x5709[8]];_0x31e2x6< _0x31e2x7;_0x31e2x6++){var _0x31e2x8=events[_0x31e2x6];var _0x31e2x9=createListener(_0x5709[9]+ _0x31e2x8,_0x31e2x5);ChatMessageEvents[_0x5709[10]](_0x31e2x8,_0x31e2x9);_0x31e2x5[_0x5709[10]](_0x5709[11],removeListener(_0x31e2x8,_0x31e2x9))}};function createListener(_0x31e2x8,_0x31e2x5){return function(_0x31e2xb){return _0x31e2xb[_0x5709[32]]()[_0x5709[31]](function(_0x31e2x11){return [_0x31e2x11[_0x5709[29]]({attributes:[_0x5709[17],_0x5709[23],_0x5709[24],_0x5709[25],_0x5709[26],_0x5709[27],_0x5709[28]],raw:true}),_0x31e2x11[_0x5709[30]]({attributes:[_0x5709[17],_0x5709[24],_0x5709[25]],raw:true})]})[_0x5709[22]](function(_0x31e2xd,_0x31e2xe){var _0x31e2xf=_[_0x5709[15]](_0x31e2xd,{id:_0x31e2xb[_0x5709[14]]});_0x31e2xd[_0x5709[21]](function(_0x31e2x10){if(_0x31e2x5[_0x5709[16]]== _0x31e2x10[_0x5709[17]]&& (_0x31e2xf|| _0x31e2xe)){_0x31e2x5[_0x5709[20]](_0x31e2x8,_[_0x5709[19]](_0x31e2xb[_0x5709[18]],{User:_0x31e2xf,ChatVisitor:_0x31e2xf?null:_0x31e2xe}))}})})[_0x5709[13]](function(_0x31e2xc){console[_0x5709[12]](_0x31e2xc)})}}function removeListener(_0x31e2x8,_0x31e2x9){return function(){ChatMessageEvents[_0x5709[33]](_0x31e2x8,_0x31e2x9)}}