92efc4a9b87b9b9d21d8072d976d3f829c3b50f5
[motion.git] / server / api / chat_message / chat_message.socket.js
1 var _0x66c4=["\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"];_0x66c4[0];const _=require(_0x66c4[1]);const ChatMessage=require(_0x66c4[3])[_0x66c4[2]];const ChatMessageEvents=require(_0x66c4[4]);var events=[_0x66c4[5],_0x66c4[6]];exports[_0x66c4[7]]= function(_0x6984x5){for(var _0x6984x6=0,_0x6984x7=events[_0x66c4[8]];_0x6984x6< _0x6984x7;_0x6984x6++){var _0x6984x8=events[_0x6984x6];var _0x6984x9=createListener(_0x66c4[9]+ _0x6984x8,_0x6984x5);ChatMessageEvents[_0x66c4[10]](_0x6984x8,_0x6984x9);_0x6984x5[_0x66c4[10]](_0x66c4[11],removeListener(_0x6984x8,_0x6984x9))}};function createListener(_0x6984x8,_0x6984x5){return function(_0x6984xb){return _0x6984xb[_0x66c4[32]]()[_0x66c4[31]](function(_0x6984x11){return [_0x6984x11[_0x66c4[29]]({attributes:[_0x66c4[17],_0x66c4[23],_0x66c4[24],_0x66c4[25],_0x66c4[26],_0x66c4[27],_0x66c4[28]],raw:true}),_0x6984x11[_0x66c4[30]]({attributes:[_0x66c4[17],_0x66c4[24],_0x66c4[25]],raw:true})]})[_0x66c4[22]](function(_0x6984xd,_0x6984xe){var _0x6984xf=_[_0x66c4[15]](_0x6984xd,{id:_0x6984xb[_0x66c4[14]]});_0x6984xd[_0x66c4[21]](function(_0x6984x10){if(_0x6984x5[_0x66c4[16]]== _0x6984x10[_0x66c4[17]]&& (_0x6984xf|| _0x6984xe)){_0x6984x5[_0x66c4[20]](_0x6984x8,_[_0x66c4[19]](_0x6984xb[_0x66c4[18]],{User:_0x6984xf,ChatVisitor:_0x6984xf?null:_0x6984xe}))}})})[_0x66c4[13]](function(_0x6984xc){console[_0x66c4[12]](_0x6984xc)})}}function removeListener(_0x6984x8,_0x6984x9){return function(){ChatMessageEvents[_0x66c4[33]](_0x6984x8,_0x6984x9)}}