tuwunel_admin/room/
mod.rs1mod alias;
2mod delete;
3mod directory;
4mod exists;
5mod info;
6mod list;
7mod moderation;
8mod prune_empty;
9mod purge_user;
10
11use clap::Subcommand;
12use ruma::OwnedRoomId;
13use tuwunel_core::Result;
14
15use self::{
16 alias::RoomAliasCommand, directory::RoomDirectoryCommand, info::RoomInfoCommand,
17 moderation::RoomModerationCommand,
18};
19use crate::admin_command_dispatch;
20
21#[admin_command_dispatch(handler_prefix = "room")]
22#[derive(Debug, Subcommand)]
23pub(super) enum RoomCommand {
24 List {
26 page: Option<usize>,
27
28 #[arg(long)]
30 exclude_disabled: bool,
31
32 #[arg(long)]
34 exclude_banned: bool,
35
36 #[arg(long)]
37 no_details: bool,
40 },
41
42 #[command(subcommand)]
43 Info(RoomInfoCommand),
45
46 #[command(subcommand)]
47 Moderation(RoomModerationCommand),
49
50 #[command(subcommand)]
51 Alias(RoomAliasCommand),
53
54 #[command(subcommand)]
55 Directory(RoomDirectoryCommand),
57
58 Exists {
60 room_id: OwnedRoomId,
61 },
62
63 Delete {
65 room_id: OwnedRoomId,
66
67 #[arg(short, long)]
68 force: bool,
69 },
70
71 PruneEmpty {
73 #[arg(short, long)]
74 force: bool,
75 },
76
77 PurgeUser {
84 user_id: String,
87
88 #[arg(long)]
90 regex: bool,
91
92 #[arg(long)]
94 sole_member: bool,
95
96 #[arg(long)]
98 dry_run: bool,
99 },
100}