From f14a2536646fc620f1408d15341695043f556efe Mon Sep 17 00:00:00 2001 From: strawberry Date: Sat, 7 Sep 2024 12:46:59 -0400 Subject: [PATCH] add local_only arg to list joined members in room admin cmd Signed-off-by: strawberry --- src/admin/room/info.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/admin/room/info.rs b/src/admin/room/info.rs index 8ba0a796..d17a2924 100644 --- a/src/admin/room/info.rs +++ b/src/admin/room/info.rs @@ -10,6 +10,10 @@ pub(crate) enum RoomInfoCommand { /// - List joined members in a room ListJoinedMembers { room_id: Box, + + /// Lists only our local users in the specified room + #[arg(long)] + local_only: bool, }, /// - Displays room topic @@ -22,7 +26,7 @@ pub(crate) enum RoomInfoCommand { } #[admin_command] -async fn list_joined_members(&self, room_id: Box) -> Result { +async fn list_joined_members(&self, room_id: Box, local_only: bool) -> Result { let room_name = self .services .rooms @@ -37,7 +41,15 @@ async fn list_joined_members(&self, room_id: Box) -> Result