From 4a371773b4006ba3d68bdad60f2ae31f0c27c701 Mon Sep 17 00:00:00 2001 From: timedout Date: Wed, 28 Jan 2026 18:26:16 +0000 Subject: [PATCH] feat: Add room deletion --- src/admin/room/commands.rs | 5 +++++ src/admin/room/mod.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/admin/room/commands.rs b/src/admin/room/commands.rs index 81f36f15..353d07d4 100644 --- a/src/admin/room/commands.rs +++ b/src/admin/room/commands.rs @@ -4,6 +4,11 @@ use ruma::OwnedRoomId; use crate::{PAGE_SIZE, admin_command, get_room_info}; +#[admin_command] +pub(super) async fn delete(&self, room_id: OwnedRoomId) -> Result { + self.write_str(&format!("Deleted {room_id} 👍")).await +} + #[admin_command] pub(super) async fn list_rooms( &self, diff --git a/src/admin/room/mod.rs b/src/admin/room/mod.rs index f6a668fd..43a1c449 100644 --- a/src/admin/room/mod.rs +++ b/src/admin/room/mod.rs @@ -56,4 +56,9 @@ pub enum RoomCommand { Exists { room_id: OwnedRoomId, }, + + /// Deletes a room + Delete { + room_id: OwnedRoomId, + }, }