diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-06-12 14:36:44 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-06-12 14:36:44 +0100 |
commit | d907e8f599554a3ff1b65bf7eb22aeb1e63e5f21 (patch) | |
tree | 10a2ab2f26bd387c2e62ac265d21762acf26790f /synapse/handlers/room.py | |
parent | Merge branch 'master' into dinsic (diff) | |
parent | 1.0.0 (diff) | |
download | synapse-d907e8f599554a3ff1b65bf7eb22aeb1e63e5f21.tar.xz |
Merge branch 'master' into dinsic
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 2a3a1d401d..dbcfb8990f 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -27,7 +27,7 @@ from twisted.internet import defer from synapse.api.constants import EventTypes, JoinRules, RoomCreationPreset from synapse.api.errors import AuthError, Codes, NotFoundError, StoreError, SynapseError -from synapse.api.room_versions import DEFAULT_ROOM_VERSION, KNOWN_ROOM_VERSIONS +from synapse.api.room_versions import KNOWN_ROOM_VERSIONS from synapse.storage.state import StateFilter from synapse.types import RoomAlias, RoomID, RoomStreamToken, StreamToken, UserID from synapse.util import stringutils @@ -72,6 +72,7 @@ class RoomCreationHandler(BaseHandler): self.spam_checker = hs.get_spam_checker() self.event_creation_handler = hs.get_event_creation_handler() self.room_member_handler = hs.get_room_member_handler() + self.config = hs.config # linearizer to stop two upgrades happening at once self._upgrade_linearizer = Linearizer("room_upgrade_linearizer") @@ -511,7 +512,11 @@ class RoomCreationHandler(BaseHandler): if ratelimit: yield self.ratelimit(requester) - room_version = config.get("room_version", DEFAULT_ROOM_VERSION.identifier) + room_version = config.get( + "room_version", + self.config.default_room_version.identifier, + ) + if not isinstance(room_version, string_types): raise SynapseError( 400, |