feat: send logs into admin room

Log entries will automatically be deduplicated, so a message won't be
sent if the same line has already been sent in the last 30 mins
This commit is contained in:
Timo Kösters 2020-11-14 23:13:06 +01:00
parent ecea0d4af2
commit 9439f2c183
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
6 changed files with 87 additions and 23 deletions

View file

@ -62,12 +62,12 @@ impl Globals {
.unwrap_or("localhost")
.to_string()
.try_into()
.map_err(|_| Error::BadConfig("Invalid server_name."))?,
.map_err(|_| Error::bad_config("Invalid server_name."))?,
max_request_size: config
.get_int("max_request_size")
.unwrap_or(20 * 1024 * 1024) // Default to 20 MB
.try_into()
.map_err(|_| Error::BadConfig("Invalid max_request_size."))?,
.map_err(|_| Error::bad_config("Invalid max_request_size."))?,
registration_disabled: config.get_bool("registration_disabled").unwrap_or(false),
encryption_disabled: config.get_bool("encryption_disabled").unwrap_or(false),
federation_enabled: config.get_bool("federation_enabled").unwrap_or(false),