diff --git a/changelog.d/1741.feature b/changelog.d/1741.feature index 211aaf821..cb20421fa 100644 --- a/changelog.d/1741.feature +++ b/changelog.d/1741.feature @@ -1 +1 @@ -Add `!admin users force-reject-invites` to clean invite spam +Add `!admin users reject-all-invites` to clean invite spam diff --git a/src/admin/user/commands.rs b/src/admin/user/commands.rs index 8239c4841..ab11877a8 100644 --- a/src/admin/user/commands.rs +++ b/src/admin/user/commands.rs @@ -471,7 +471,7 @@ pub(super) async fn list_invited_rooms(&self, user_id: String) -> Result { } #[admin_command] -pub(super) async fn force_reject_invites(&self, user_id: String) -> Result { +pub(super) async fn reject_all_invites(&self, user_id: String) -> Result { let user_id = parse_local_user_id(self.services, &user_id)?; assert!( @@ -487,7 +487,7 @@ pub(super) async fn force_reject_invites(&self, user_id: String) -> Result { .filter_map(async |(room_id, _)| { match leave_room(self.services, &user_id, &room_id, None).await { | Err(ref e) => { - warn!(%user_id, "Failed to leave {room_id} remotely: {e}"); + warn!(%user_id, "Failed to leave {room_id}: {e}"); Some(()) }, | Ok(()) => None, diff --git a/src/admin/user/mod.rs b/src/admin/user/mod.rs index beed3f96c..5f88d9b72 100644 --- a/src/admin/user/mod.rs +++ b/src/admin/user/mod.rs @@ -166,14 +166,14 @@ pub enum UserCommand { user_id: String, }, - /// Lists all the rooms (local and remote) that the specified user is - /// joined in - ListJoinedRooms { + /// Manually make a user reject all current invites + RejectAllInvites { user_id: String, }, - /// Manually make a user reject all current invites - ForceRejectInvites { + /// Lists all the rooms (local and remote) that the specified user is + /// joined in + ListJoinedRooms { user_id: String, },