ab2e0a155bd292db59afc7c09ab60696a0267fd2
[motion.git] / server / api / user_has_chat_room / user_has_chat_room.socket.js
1 var _0x5990=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x75\x73\x65\x72\x49\x64","\x69\x64","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x55\x73\x65\x72\x73","\x74\x68\x65\x6E","\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\x73\x61\x76\x65","\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","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5990[0];const UserHasChatRoomEvents=require(_0x5990[1]);const ChatRoom=require(_0x5990[3])[_0x5990[2]];const User=require(_0x5990[3])[_0x5990[4]];var events=[_0x5990[5],_0x5990[6]];exports[_0x5990[7]]= function(_0x9149x5){for(var _0x9149x6=0,_0x9149x7=events[_0x5990[8]];_0x9149x6< _0x9149x7;_0x9149x6++){var _0x9149x8=events[_0x9149x6];var _0x9149x9=createListener(_0x5990[9]+ _0x9149x8,_0x9149x5);UserHasChatRoomEvents[_0x5990[10]](_0x9149x8,_0x9149x9);_0x9149x5[_0x5990[10]](_0x5990[11],removeListener(_0x9149x8,_0x9149x9))}};function createListener(_0x9149x8,_0x9149x5){return function(_0x9149xb){switch(_0x9149x8){case _0x5990[21]:return ChatRoom[_0x5990[20]](_0x9149xb.ChatRoomId,{include:[{model:User,attributes:[_0x5990[15]]}]})[_0x5990[19]](function(_0x9149xd){_0x9149xd[_0x5990[18]][_0x5990[17]](function(_0x9149xe){if(_0x9149x5[_0x5990[14]]== _0x9149xe[_0x5990[15]]){_0x9149x5[_0x5990[16]](_0x9149x8,_0x9149xb)}})})[_0x5990[13]](function(_0x9149xc){console[_0x5990[12]](_0x9149xc)});case _0x5990[22]:_0x9149x5[_0x5990[16]](_0x9149x8,_0x9149xb);break;default:}}}function removeListener(_0x9149x8,_0x9149x9){return function(){UserHasChatRoomEvents[_0x5990[23]](_0x9149x8,_0x9149x9)}}