Only send message if joined room
Currently, if you have the room id, you can send a message to any public room without having to join it.
This makes the /remove
command a bit less useful. A real-world example popped up where someone removed a user who was running a bot on their account, but the bot was still responding to peoples commands, most likely because they have still have a realtime-client
stream running. They didn't want to ban the user as they were a legitimate member, and just weren't around to tend to their bot that was misbehaving.
We need to close those streams once the user is removed and only allow sending a message to rooms that you have joined.
Edited by 🤖 GitLab Bot 🤖