2024-06-16 22:26:52 +00:00
|
|
|
mod commands;
|
|
|
|
|
2024-04-20 19:55:14 -04:00
|
|
|
use clap::Subcommand;
|
2024-06-16 22:26:52 +00:00
|
|
|
use conduit::Result;
|
2024-07-27 00:11:41 +00:00
|
|
|
use ruma::{RoomId, ServerName, UserId};
|
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]
|
2024-07-24 00:13:03 +00:00
|
|
|
#[derive(Debug, Subcommand)]
|
2024-06-16 22:26:52 +00:00
|
|
|
pub(super) enum FederationCommand {
|
2024-04-20 19:55:14 -04:00
|
|
|
/// - List all rooms we are currently handling an incoming pdu from
|
|
|
|
IncomingFederation,
|
|
|
|
|
|
|
|
/// - Disables incoming federation handling for a room.
|
|
|
|
DisableRoom {
|
|
|
|
room_id: Box<RoomId>,
|
|
|
|
},
|
|
|
|
|
|
|
|
/// - Enables incoming federation handling for a room again.
|
|
|
|
EnableRoom {
|
|
|
|
room_id: Box<RoomId>,
|
|
|
|
},
|
|
|
|
|
|
|
|
/// - Fetch `/.well-known/matrix/support` from the specified server
|
|
|
|
///
|
|
|
|
/// 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: Box<ServerName>,
|
|
|
|
},
|
2024-04-27 01:06:43 -04:00
|
|
|
|
|
|
|
/// - Lists all the rooms we share/track with the specified *remote* user
|
|
|
|
RemoteUserInRooms {
|
|
|
|
user_id: Box<UserId>,
|
|
|
|
},
|
2024-04-20 19:55:14 -04:00
|
|
|
}
|