Implement admin check and add config option for allowing room creation

This commit is contained in:
Nyaaori 2021-09-24 07:16:34 +00:00
parent 47f3263396
commit 6bc8fb2ae7
No known key found for this signature in database
GPG key ID: 50C66D0980648414
4 changed files with 34 additions and 1 deletions

View file

@ -211,6 +211,10 @@ impl Globals {
self.config.allow_federation
}
pub fn allow_room_creation(&self) -> bool {
self.config.allow_room_creation
}
pub fn trusted_servers(&self) -> &[Box<ServerName>] {
&self.config.trusted_servers
}