Built motion from commit d84f5db.|0.0.24
[motion.git] / server / api / user_has_chat_room / user_has_chat_room.socket.js
1 var _0xaf3c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x63\x68\x61\x74\x52\x6F\x6F\x6D","\x6C\x6F\x67","\x69\x64","\x70\x6C\x75\x63\x6B","\x75\x73\x65\x72\x49\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x65\x6D\x61\x69\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65"];_0xaf3c[0];var _=require(_0xaf3c[1]);var User=require(_0xaf3c[3])[_0xaf3c[2]];var ChatRoom=require(_0xaf3c[3])[_0xaf3c[4]];var ChatVisitor=require(_0xaf3c[3])[_0xaf3c[5]];var UserHasChatRoom=require(_0xaf3c[3])[_0xaf3c[6]];exports[_0xaf3c[7]]=function(_0xc545x6){UserHasChatRoom[_0xaf3c[8]](function(_0xc545x7){onSave(_0xc545x6,_0xc545x7)});UserHasChatRoom[_0xaf3c[9]](function(_0xc545x7){onRemove(_0xc545x6,_0xc545x7)});};function onSave(_0xc545x6,_0xc545x7){var _0xc545x9;return ChatRoom[_0xaf3c[26]](_0xc545x7.ChatRoomId,{include:[{model:ChatVisitor,attributes:[_0xaf3c[16],_0xaf3c[23],_0xaf3c[24]]},{model:User,attributes:[_0xaf3c[16],_0xaf3c[23],_0xaf3c[25],_0xaf3c[24]]}]})[_0xaf3c[22]](function(_0xc545xb){_0xc545x9=_0xc545xb;_0xc545x9[_0xaf3c[13]][_0xaf3c[12]]=[];console[_0xaf3c[15]](_0xaf3c[14],_0xc545x9);var _0xc545xc=_[_0xaf3c[17]](_0xc545x9.Users,_0xaf3c[16]);_0xc545xc[_0xaf3c[21]](function(_0xc545xd){if(_0xc545x6[_0xaf3c[18]]==_0xc545xd){_0xc545x6[_0xaf3c[20]](_0xaf3c[19],_0xc545x9[_0xaf3c[13]])}});return ;})[_0xaf3c[11]](function(_0xc545xa){console[_0xaf3c[10]](_0xc545xa)});}function onRemove(_0xc545x6,_0xc545x7){_0xc545x6[_0xaf3c[20]](_0xaf3c[27],_0xc545x7)}