chore(!783): Update config file documentation, depluralize token subcommand

This commit is contained in:
Ginger
2026-01-07 14:22:37 +00:00
parent bf205fb13c
commit ea0a124981
3 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -452,7 +452,8 @@
# `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse` # `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse`
# to true to allow open registration without any conditions. # to true to allow open registration without any conditions.
# #
# YOU NEED TO EDIT THIS OR USE registration_token_file. # If you do not want to set a static token, the `!admin token` commands may also be used
# to manage registration tokens.
# #
# example: "o&^uCtes4HPf0Vu@F20jQeeWE7" # example: "o&^uCtes4HPf0Vu@F20jQeeWE7"
# #
+2 -2
View File
@@ -28,7 +28,7 @@ pub enum AdminCommand {
#[command(subcommand)] #[command(subcommand)]
/// - Commands for managing registration tokens /// - Commands for managing registration tokens
Tokens(TokenCommand), Token(TokenCommand),
#[command(subcommand)] #[command(subcommand)]
/// - Commands for managing rooms /// - Commands for managing rooms
@@ -75,7 +75,7 @@ pub(super) async fn process(command: AdminCommand, context: &Context<'_>) -> Res
context.bail_restricted()?; context.bail_restricted()?;
user::process(command, context).await user::process(command, context).await
}, },
| Tokens(command) => { | Token(command) => {
// token commands are all restricted // token commands are all restricted
context.bail_restricted()?; context.bail_restricted()?;
token::process(command, context).await token::process(command, context).await
+4 -2
View File
@@ -576,7 +576,8 @@ pub struct Config {
/// `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse` /// `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse`
/// to true to allow open registration without any conditions. /// to true to allow open registration without any conditions.
/// ///
/// YOU NEED TO EDIT THIS OR USE registration_token_file. /// If you do not want to set a static token, the `!admin token` commands
/// may also be used to manage registration tokens.
/// ///
/// example: "o&^uCtes4HPf0Vu@F20jQeeWE7" /// example: "o&^uCtes4HPf0Vu@F20jQeeWE7"
/// ///
@@ -2287,7 +2288,7 @@ pub struct DraupnirConfig {
pub secret: String, pub secret: String,
} }
const DEPRECATED_KEYS: &[&str; 9] = &[ const DEPRECATED_KEYS: &[&str] = &[
"cache_capacity", "cache_capacity",
"conduit_cache_capacity_modifier", "conduit_cache_capacity_modifier",
"max_concurrent_requests", "max_concurrent_requests",
@@ -2297,6 +2298,7 @@ const DEPRECATED_KEYS: &[&str; 9] = &[
"well_known_support_role", "well_known_support_role",
"well_known_support_email", "well_known_support_email",
"well_known_support_mxid", "well_known_support_mxid",
"registration_token_file",
]; ];
impl Config { impl Config {