Skip to main content

tuwunel_admin/federation/
mod.rs

1mod commands;
2
3use clap::Subcommand;
4use ruma::{OwnedRoomId, OwnedServerName, OwnedUserId};
5use tuwunel_core::Result;
6
7use crate::admin_command_dispatch;
8
9#[admin_command_dispatch]
10#[derive(Debug, Subcommand)]
11pub(super) enum FederationCommand {
12	/// - List all rooms we are currently handling an incoming pdu from
13	IncomingFederation,
14
15	/// - Disables incoming federation handling for a room.
16	DisableRoom {
17		room_id: OwnedRoomId,
18	},
19
20	/// - Enables incoming federation handling for a room again.
21	EnableRoom {
22		room_id: OwnedRoomId,
23	},
24
25	/// - Fetch `/.well-known/matrix/support` from the specified server
26	///
27	/// Despite the name, this is not a federation endpoint and does not go
28	/// through the federation / server resolution process as per-spec this is
29	/// supposed to be served at the server_name.
30	///
31	/// Respecting homeservers put this file here for listing administration,
32	/// moderation, and security inquiries. This command provides a way to
33	/// easily fetch that information.
34	FetchSupportWellKnown {
35		server_name: OwnedServerName,
36	},
37
38	/// - Lists all the rooms we share/track with the specified *remote* user
39	RemoteUserInRooms {
40		user_id: OwnedUserId,
41	},
42}