Files
continuwuity/src/admin/federation/mod.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
Rust
Raw Normal View History

mod commands;
2024-04-20 19:55:14 -04:00
use clap::Subcommand;
2024-12-14 21:58:01 -05:00
use conduwuit::Result;
use ruma::{OwnedRoomId, OwnedServerName, OwnedUserId};
2024-04-20 19:55:14 -04:00
2024-07-27 00:11:41 +00:00
use crate::admin_command_dispatch;
2024-04-20 19:55:14 -04:00
2024-07-27 00:11:41 +00:00
#[admin_command_dispatch]
#[derive(Debug, Subcommand)]
2025-05-24 00:28:09 +01:00
pub enum FederationCommand {
/// List all rooms we are currently handling an incoming pdu from
2024-04-20 19:55:14 -04:00
IncomingFederation,
/// Disables incoming federation handling for a room.
2024-04-20 19:55:14 -04:00
DisableRoom {
room_id: OwnedRoomId,
2024-04-20 19:55:14 -04:00
},
/// Enables incoming federation handling for a room again.
2024-04-20 19:55:14 -04:00
EnableRoom {
room_id: OwnedRoomId,
2024-04-20 19:55:14 -04:00
},
/// Fetch `/.well-known/matrix/support` from the specified server
2024-04-20 19:55:14 -04:00
///
/// Despite the name, this is not a federation endpoint and does not go
/// through the federation / server resolution process as per-spec this is
/// supposed to be served at the server_name.
///
/// Respecting homeservers put this file here for listing administration,
/// moderation, and security inquiries. This command provides a way to
/// easily fetch that information.
FetchSupportWellKnown {
server_name: OwnedServerName,
2024-04-20 19:55:14 -04:00
},
/// Lists all the rooms we share/track with the specified *remote* user
RemoteUserInRooms {
user_id: OwnedUserId,
},
2024-04-20 19:55:14 -04:00
}