mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 09:54:11 -04:00
Clean-up registration tests (#10945)
Uses `override_config` and fixes test_auto_create_auto_join_where_no_consent to properly configure auto-join rooms.
This commit is contained in:
parent
d1bf5f7c9d
commit
9e5a429c8b
3 changed files with 56 additions and 38 deletions
|
@ -340,6 +340,8 @@ class RegistrationHandler(BaseHandler):
|
|||
auth_provider=(auth_provider_id or ""),
|
||||
).inc()
|
||||
|
||||
# If the user does not need to consent at registration, auto-join any
|
||||
# configured rooms.
|
||||
if not self.hs.config.consent.user_consent_at_registration:
|
||||
if not self.hs.config.auto_join_rooms_for_guests and make_guest:
|
||||
logger.info(
|
||||
|
@ -387,7 +389,7 @@ class RegistrationHandler(BaseHandler):
|
|||
"preset": self.hs.config.registration.autocreate_auto_join_room_preset,
|
||||
}
|
||||
|
||||
# If the configuration providers a user ID to create rooms with, use
|
||||
# If the configuration provides a user ID to create rooms with, use
|
||||
# that instead of the first user registered.
|
||||
requires_join = False
|
||||
if self.hs.config.registration.auto_join_user_id:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue