add admin command to delete all remote media from a specific server

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-08-25 16:10:07 -04:00 committed by Jason Volk
parent 8923c9a227
commit fb49e37067
3 changed files with 105 additions and 6 deletions

View file

@ -2,7 +2,7 @@ mod commands;
use clap::Subcommand;
use conduit::Result;
use ruma::{EventId, MxcUri};
use ruma::{EventId, MxcUri, ServerName};
use crate::admin_command_dispatch;
@ -46,4 +46,13 @@ pub(super) enum MediaCommand {
#[arg(short, long)]
force: bool,
},
/// - Deletes all remote media from the specified remote server
DeleteAllFromServer {
server_name: Box<ServerName>,
/// Continues deleting media if an undeletable object is found
#[arg(short, long)]
force: bool,
},
}