mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-11 08:24:19 -05:00
remove errant exception and style
This commit is contained in:
parent
c6584f4b5f
commit
a67d8ace9b
@ -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
|
||||||
|
@ -18,7 +18,7 @@ from distutils.util import strtobool
|
|||||||
from synapse.types import RoomAlias
|
from synapse.types import RoomAlias
|
||||||
from synapse.util.stringutils import random_string_with_symbols
|
from synapse.util.stringutils import random_string_with_symbols
|
||||||
|
|
||||||
from ._base import Config, ConfigError
|
from synapse.config._base import Config, ConfigError
|
||||||
|
|
||||||
|
|
||||||
class RegistrationConfig(Config):
|
class RegistrationConfig(Config):
|
||||||
|
@ -231,15 +231,15 @@ class RegistrationHandler(BaseHandler):
|
|||||||
for r in self.hs.config.auto_join_rooms:
|
for r in self.hs.config.auto_join_rooms:
|
||||||
try:
|
try:
|
||||||
if should_auto_create_rooms:
|
if should_auto_create_rooms:
|
||||||
if self.hs.hostname != RoomAlias.from_string(r).domain:
|
room_alias = RoomAlias.from_string(r)
|
||||||
logger.warn(
|
if self.hs.hostname != room_alias.domain:
|
||||||
|
logger.warning(
|
||||||
'Cannot create room alias %s, '
|
'Cannot create room alias %s, '
|
||||||
'it does not match server domain' % (r,)
|
'it does not match server domain', (r,)
|
||||||
)
|
)
|
||||||
raise SynapseError()
|
|
||||||
else:
|
else:
|
||||||
# create room expects the localpart of the room alias
|
# 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(
|
yield self.room_creation_handler.create_room(
|
||||||
fake_requester,
|
fake_requester,
|
||||||
config={
|
config={
|
||||||
|
Loading…
Reference in New Issue
Block a user