Skip to content
Snippets Groups Projects
Commit 3523f543 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Don't expose default_room_version as config opt

parent 7f3f1085
No related branches found
No related tags found
No related merge requests found
...@@ -97,6 +97,9 @@ class ThirdPartyEntityKind(object): ...@@ -97,6 +97,9 @@ class ThirdPartyEntityKind(object):
LOCATION = "location" LOCATION = "location"
# the version we will give rooms which are created on this server
DEFAULT_ROOM_VERSION = "1"
# vdh-test-version is a placeholder to get room versioning support working and tested # vdh-test-version is a placeholder to get room versioning support working and tested
# until we have a working v2. # until we have a working v2.
KNOWN_ROOM_VERSIONS = {"1", "vdh-test-version"} KNOWN_ROOM_VERSIONS = {"1", "vdh-test-version"}
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import logging import logging
from synapse.api.constants import KNOWN_ROOM_VERSIONS
from synapse.http.endpoint import parse_and_validate_server_name from synapse.http.endpoint import parse_and_validate_server_name
from ._base import Config, ConfigError from ._base import Config, ConfigError
...@@ -76,16 +75,6 @@ class ServerConfig(Config): ...@@ -76,16 +75,6 @@ class ServerConfig(Config):
) )
else: else:
self.max_mau_value = 0 self.max_mau_value = 0
# the version of rooms created by default on this server
self.default_room_version = str(config.get(
"default_room_version", "1",
))
if self.default_room_version not in KNOWN_ROOM_VERSIONS:
raise ConfigError("Unrecognised value '%s' for default_room_version" % (
self.default_room_version,
))
# FIXME: federation_domain_whitelist needs sytests # FIXME: federation_domain_whitelist needs sytests
self.federation_domain_whitelist = None self.federation_domain_whitelist = None
federation_domain_whitelist = config.get( federation_domain_whitelist = config.get(
...@@ -260,9 +249,6 @@ class ServerConfig(Config): ...@@ -260,9 +249,6 @@ class ServerConfig(Config):
# (except those sent by local server admins). The default is False. # (except those sent by local server admins). The default is False.
# block_non_admin_invites: True # block_non_admin_invites: True
# The room_version of rooms which are created by default by this server.
# default_room_version: 1
# Restrict federation to the following whitelist of domains. # Restrict federation to the following whitelist of domains.
# N.B. we recommend also firewalling your federation listener to limit # N.B. we recommend also firewalling your federation listener to limit
# inbound federation traffic as early as possible, rather than relying # inbound federation traffic as early as possible, rather than relying
......
...@@ -26,6 +26,7 @@ from six import string_types ...@@ -26,6 +26,7 @@ from six import string_types
from twisted.internet import defer from twisted.internet import defer
from synapse.api.constants import ( from synapse.api.constants import (
DEFAULT_ROOM_VERSION,
KNOWN_ROOM_VERSIONS, KNOWN_ROOM_VERSIONS,
EventTypes, EventTypes,
JoinRules, JoinRules,
...@@ -106,7 +107,7 @@ class RoomCreationHandler(BaseHandler): ...@@ -106,7 +107,7 @@ class RoomCreationHandler(BaseHandler):
if ratelimit: if ratelimit:
yield self.ratelimit(requester) yield self.ratelimit(requester)
room_version = config.get("room_version", self.hs.config.default_room_version) room_version = config.get("room_version", DEFAULT_ROOM_VERSION)
if not isinstance(room_version, string_types): if not isinstance(room_version, string_types):
raise SynapseError( raise SynapseError(
400, 400,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment