Add show-config admin room command

This commit is contained in:
Andrej Kacian 2022-02-06 20:23:22 +01:00
parent 237645e975
commit 196c83939c
3 changed files with 100 additions and 1 deletions

View file

@ -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)