Add show-config admin room command
This commit is contained in:
parent
237645e975
commit
196c83939c
3 changed files with 100 additions and 1 deletions
|
@ -259,6 +259,9 @@ enum AdminCommand {
|
|||
|
||||
/// Print database memory usage statistics
|
||||
DatabaseMemoryUsage,
|
||||
|
||||
/// Show configuration values
|
||||
ShowConfig,
|
||||
}
|
||||
|
||||
fn process_admin_command(
|
||||
|
@ -428,6 +431,10 @@ fn process_admin_command(
|
|||
e
|
||||
)),
|
||||
},
|
||||
AdminCommand::ShowConfig => {
|
||||
// Construct and send the response
|
||||
RoomMessageEventContent::text_plain(format!("{}", db.globals.config))
|
||||
}
|
||||
};
|
||||
|
||||
Ok(reply_message_content)
|
||||
|
|
|
@ -35,7 +35,7 @@ pub struct Globals {
|
|||
pub actual_destination_cache: Arc<RwLock<WellKnownMap>>, // actual_destination, host
|
||||
pub tls_name_override: Arc<RwLock<TlsNameMap>>,
|
||||
pub(super) globals: Arc<dyn Tree>,
|
||||
config: Config,
|
||||
pub config: Config,
|
||||
keypair: Arc<ruma::signatures::Ed25519KeyPair>,
|
||||
dns_resolver: TokioAsyncResolver,
|
||||
jwt_decoding_key: Option<jsonwebtoken::DecodingKey<'static>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue