summary refs log tree commit diff
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-10-23 17:44:39 +0100
committerNeil Johnson <neil@matrix.org>2018-10-23 17:44:39 +0100
commita67d8ace9bc8b5f5ab953fdcfd6ade077337782d (patch)
tree0fd112cd8b83f704e7b25d4bdb9820843f9bd704
parentclean up config error logic and imports (diff)
downloadsynapse-a67d8ace9bc8b5f5ab953fdcfd6ade077337782d.tar.xz
remove errant exception and style
Diffstat (limited to '')
-rw-r--r--changelog.d/3975.feature2
-rw-r--r--synapse/config/registration.py2
-rw-r--r--synapse/handlers/register.py10
3 files changed, 7 insertions, 7 deletions
diff --git a/changelog.d/3975.feature b/changelog.d/3975.feature
index 79c2711fb4..1e33f1b3b8 100644
--- a/changelog.d/3975.feature
+++ b/changelog.d/3975.feature
@@ -1 +1 @@
-Servers with auto-join rooms, should automatically create those rooms when first user registers
+Servers with auto-join rooms, will now automatically create those rooms when the first user registers
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 4b9bf6f2d1..5df321b287 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -18,7 +18,7 @@ from distutils.util import strtobool
 from synapse.types import RoomAlias
 from synapse.util.stringutils import random_string_with_symbols
 
-from ._base import Config, ConfigError
+from synapse.config._base import Config, ConfigError
 
 
 class RegistrationConfig(Config):
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 1b5873c8d7..9615dd552f 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -231,15 +231,15 @@ class RegistrationHandler(BaseHandler):
         for r in self.hs.config.auto_join_rooms:
             try:
                 if should_auto_create_rooms:
-                    if self.hs.hostname != RoomAlias.from_string(r).domain:
-                        logger.warn(
+                    room_alias = RoomAlias.from_string(r)
+                    if self.hs.hostname != room_alias.domain:
+                        logger.warning(
                             'Cannot create room alias %s, '
-                            'it does not match server domain' % (r,)
+                            'it does not match server domain', (r,)
                         )
-                        raise SynapseError()
                     else:
                         # create room expects the localpart of the room alias
-                        room_alias_localpart = RoomAlias.from_string(r).localpart
+                        room_alias_localpart = room_alias.localpart
                         yield self.room_creation_handler.create_room(
                             fake_requester,
                             config={