tuwunel_admin/room/
mod.rs1mod alias;
2mod commands;
3mod directory;
4mod info;
5mod moderation;
6
7use clap::Subcommand;
8use ruma::OwnedRoomId;
9use tuwunel_core::Result;
10
11use self::{
12 alias::RoomAliasCommand, directory::RoomDirectoryCommand, info::RoomInfoCommand,
13 moderation::RoomModerationCommand,
14};
15use crate::admin_command_dispatch;
16
17#[admin_command_dispatch(handler_prefix = "room")]
18#[derive(Debug, Subcommand)]
19pub(super) enum RoomCommand {
20 List {
22 page: Option<usize>,
23
24 #[arg(long)]
26 exclude_disabled: bool,
27
28 #[arg(long)]
30 exclude_banned: bool,
31
32 #[arg(long)]
33 no_details: bool,
36 },
37
38 #[command(subcommand)]
39 Info(RoomInfoCommand),
41
42 #[command(subcommand)]
43 Moderation(RoomModerationCommand),
45
46 #[command(subcommand)]
47 Alias(RoomAliasCommand),
49
50 #[command(subcommand)]
51 Directory(RoomDirectoryCommand),
53
54 Exists {
56 room_id: OwnedRoomId,
57 },
58
59 Delete {
61 room_id: OwnedRoomId,
62
63 #[arg(short, long)]
64 force: bool,
65 },
66
67 PruneEmpty {
69 #[arg(short, long)]
70 force: bool,
71 },
72}