0edbbad084edcd35c555ea93496cb4886f05813b
[motion.git] / server / api / chat_message / chat_message.socket.js
1 var _0xa55d=["\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"];_0xa55d[0];const _=require(_0xa55d[1]);const ChatMessage=require(_0xa55d[3])[_0xa55d[2]];const ChatMessageEvents=require(_0xa55d[4]);var events=[_0xa55d[5],_0xa55d[6]];exports[_0xa55d[7]]= function(_0x58eax5){for(var _0x58eax6=0,_0x58eax7=events[_0xa55d[8]];_0x58eax6< _0x58eax7;_0x58eax6++){var _0x58eax8=events[_0x58eax6];var _0x58eax9=createListener(_0xa55d[9]+ _0x58eax8,_0x58eax5);ChatMessageEvents[_0xa55d[10]](_0x58eax8,_0x58eax9);_0x58eax5[_0xa55d[10]](_0xa55d[11],removeListener(_0x58eax8,_0x58eax9))}};function createListener(_0x58eax8,_0x58eax5){return function(_0x58eaxb){return _0x58eaxb[_0xa55d[32]]()[_0xa55d[31]](function(_0x58eax11){return [_0x58eax11[_0xa55d[29]]({attributes:[_0xa55d[17],_0xa55d[23],_0xa55d[24],_0xa55d[25],_0xa55d[26],_0xa55d[27],_0xa55d[28]],raw:true}),_0x58eax11[_0xa55d[30]]({attributes:[_0xa55d[17],_0xa55d[24],_0xa55d[25]],raw:true})]})[_0xa55d[22]](function(_0x58eaxd,_0x58eaxe){var _0x58eaxf=_[_0xa55d[15]](_0x58eaxd,{id:_0x58eaxb[_0xa55d[14]]});_0x58eaxd[_0xa55d[21]](function(_0x58eax10){if(_0x58eax5[_0xa55d[16]]== _0x58eax10[_0xa55d[17]]&& (_0x58eaxf|| _0x58eaxe)){_0x58eax5[_0xa55d[20]](_0x58eax8,_[_0xa55d[19]](_0x58eaxb[_0xa55d[18]],{User:_0x58eaxf,ChatVisitor:_0x58eaxf?null:_0x58eaxe}))}})})[_0xa55d[13]](function(_0x58eaxc){console[_0xa55d[12]](_0x58eaxc)})}}function removeListener(_0x58eax8,_0x58eax9){return function(){ChatMessageEvents[_0xa55d[33]](_0x58eax8,_0x58eax9)}}