admin command to get rooms a remote user is in, remove unnecessary dedupe+sort
imagine this SQL query but in conduwuit: select * from users_in_public_rooms where user_id like '%user_id%'; Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use std::{fmt::Write as _, sync::Arc};
|
||||
|
||||
use itertools::Itertools;
|
||||
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomId, UserId};
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
@@ -318,8 +317,6 @@ pub(crate) async fn list_joined_rooms(_body: Vec<&str>, user_id: String) -> Resu
|
||||
.rooms_joined(&user_id)
|
||||
.filter_map(Result::ok)
|
||||
.map(|room_id| get_room_info(&room_id))
|
||||
.sorted_unstable()
|
||||
.dedup()
|
||||
.collect();
|
||||
|
||||
if rooms.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user