diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-10-25 17:42:37 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-10-25 19:10:18 +0100 |
commit | 7f7b2cd3de192816bcb0225774a22617989aec37 (patch) | |
tree | 2b055e3428cf7b05bfaadff1dd6a6881c9830507 /synapse/handlers/register.py | |
parent | Factor _generate_room_id out of create_room (diff) | |
download | synapse-7f7b2cd3de192816bcb0225774a22617989aec37.tar.xz |
Make room_member_handler a member of RoomCreationHandler
... to save passing it into `_send_events_for_new_room`
Diffstat (limited to 'synapse/handlers/register.py')
-rw-r--r-- | synapse/handlers/register.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index e9d7b25a36..7b4549223f 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -50,7 +50,6 @@ class RegistrationHandler(BaseHandler): self._auth_handler = hs.get_auth_handler() self.profile_handler = hs.get_profile_handler() self.user_directory_handler = hs.get_user_directory_handler() - self.room_creation_handler = self.hs.get_room_creation_handler() self.captcha_client = CaptchaServerHttpClient(hs) self._next_generated_user_id = None @@ -241,7 +240,10 @@ class RegistrationHandler(BaseHandler): else: # create room expects the localpart of the room alias room_alias_localpart = room_alias.localpart - yield self.room_creation_handler.create_room( + + # getting the RoomCreationHandler during init gives a dependency + # loop + yield self.hs.get_room_creation_handler().create_room( fake_requester, config={ "preset": "public_chat", |