feat: forbid certain usernames & room aliases
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/582 Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
mod data;
|
||||
use argon2::Argon2;
|
||||
pub use data::Data;
|
||||
use regex::RegexSet;
|
||||
use ruma::{
|
||||
serde::Base64, OwnedDeviceId, OwnedEventId, OwnedRoomId, OwnedServerName,
|
||||
OwnedServerSigningKeyId, OwnedUserId,
|
||||
@@ -389,6 +390,14 @@ impl Service<'_> {
|
||||
&self.config.emergency_password
|
||||
}
|
||||
|
||||
pub fn forbidden_room_names(&self) -> &RegexSet {
|
||||
&self.config.forbidden_room_names
|
||||
}
|
||||
|
||||
pub fn forbidden_usernames(&self) -> &RegexSet {
|
||||
&self.config.forbidden_usernames
|
||||
}
|
||||
|
||||
pub fn allow_local_presence(&self) -> bool {
|
||||
self.config.allow_local_presence
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user