Skip to main content

tuwunel_admin/room/directory/
mod.rs

1mod list;
2mod publish;
3mod unpublish;
4
5use clap::Subcommand;
6use ruma::OwnedRoomId;
7use tuwunel_core::Result;
8
9use crate::admin_command_dispatch;
10
11#[admin_command_dispatch(handler_prefix = "directory")]
12#[derive(Debug, Subcommand)]
13pub(crate) enum RoomDirectoryCommand {
14	/// - Publish a room to the room directory
15	Publish {
16		/// The room id of the room to publish
17		room_id: OwnedRoomId,
18	},
19
20	/// - Unpublish a room to the room directory
21	Unpublish {
22		/// The room id of the room to unpublish
23		room_id: OwnedRoomId,
24	},
25
26	/// - List rooms that are published
27	List {
28		page: Option<usize>,
29	},
30}