Skip to main content

tuwunel_admin/federation/
mod.rs

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