pull stuff out of globals

This commit is contained in:
dasha_uwu
2025-09-23 02:37:31 +05:00
committed by Jason Volk
parent 6bb101ac51
commit 89a67af607
17 changed files with 83 additions and 221 deletions

View File

@@ -58,8 +58,8 @@ pub(crate) async fn get_register_available_route(
});
if services
.globals
.forbidden_usernames()
.config
.forbidden_usernames
.is_match(&body.username)
{
return Err!(Request(Forbidden("Username is forbidden")));
@@ -228,8 +228,8 @@ pub(crate) async fn register_route(
});
if services
.globals
.forbidden_usernames()
.config
.forbidden_usernames
.is_match(username)
&& !emergency_mode_enabled
{
@@ -384,8 +384,8 @@ pub(crate) async fn register_route(
// If `new_user_displayname_suffix` is set, registration will push whatever
// content is set to the user's display name with a space before it
if !services
.globals
.new_user_displayname_suffix()
.config
.new_user_displayname_suffix
.is_empty()
&& body.appservice_info.is_none()
{