check if specified user belongs to us
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
5a8abaa54d
commit
abf41f4c79
1 changed files with 6 additions and 0 deletions
|
@ -1009,6 +1009,12 @@ impl Service {
|
|||
}
|
||||
}
|
||||
UserCommand::ListJoinedRooms { user_id } => {
|
||||
if user_id.server_name() != services().globals.server_name() {
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"User does not belong to our server.",
|
||||
));
|
||||
}
|
||||
|
||||
let mut rooms: Vec<(OwnedRoomId, u64, String)> = vec![]; // room ID, members joined, room name
|
||||
|
||||
for room_id in services().rooms.state_cache.rooms_joined(&user_id) {
|
||||
|
|
Loading…
Add table
Reference in a new issue