add admin command to redact an individual event from a local user

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-08-25 14:32:47 -04:00 committed by Jason Volk
parent 2b7e0dcb80
commit 8923c9a227
3 changed files with 74 additions and 6 deletions

View file

@ -2,7 +2,7 @@ mod commands;
use clap::Subcommand;
use conduit::Result;
use ruma::{OwnedRoomOrAliasId, RoomId};
use ruma::{EventId, OwnedRoomOrAliasId, RoomId};
use crate::admin_command_dispatch;
@ -103,4 +103,12 @@ pub(super) enum UserCommand {
user_id: String,
room_id: Box<RoomId>,
},
/// - Attempts to forcefully redact the specified event ID from the sender
/// user
///
/// This is only valid for local users
RedactEvent {
event_id: Box<EventId>,
},
}