feat: Add command to purge sync tokens for empty rooms

This commit is contained in:
Jade Ellis
2025-05-21 22:44:15 +01:00
parent 873496388f
commit 3494e528ba
3 changed files with 214 additions and 0 deletions
+23
View File
@@ -67,4 +67,27 @@ pub enum RoomCommand {
#[arg(value_parser)]
room: OwnedRoomOrAliasId,
},
/// - Delete sync tokens for all rooms that have no local users
///
/// By default, processes all empty rooms. You can use --target-disabled
/// and/or --target-banned to exclusively process rooms matching those
/// conditions.
PurgeEmptyRoomTokens {
/// Confirm you want to delete tokens from potentially many rooms
#[arg(long)]
yes: bool,
/// Only purge rooms that have federation disabled
#[arg(long)]
target_disabled: bool,
/// Only purge rooms that have been banned
#[arg(long)]
target_banned: bool,
/// Perform a dry run without actually deleting any tokens
#[arg(long)]
dry_run: bool,
},
}