mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-09 14:52:04 +00:00
Don't expose default_room_version as config opt
This commit is contained in:
parent
7f3f108561
commit
3523f5432a
@ -97,6 +97,9 @@ class ThirdPartyEntityKind(object):
|
||||
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
|
||||
# until we have a working v2.
|
||||
KNOWN_ROOM_VERSIONS = {"1", "vdh-test-version"}
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
import logging
|
||||
|
||||
from synapse.api.constants import KNOWN_ROOM_VERSIONS
|
||||
from synapse.http.endpoint import parse_and_validate_server_name
|
||||
|
||||
from ._base import Config, ConfigError
|
||||
@ -76,16 +75,6 @@ class ServerConfig(Config):
|
||||
)
|
||||
else:
|
||||
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
|
||||
self.federation_domain_whitelist = None
|
||||
federation_domain_whitelist = config.get(
|
||||
@ -260,9 +249,6 @@ class ServerConfig(Config):
|
||||
# (except those sent by local server admins). The default is False.
|
||||
# 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.
|
||||
# N.B. we recommend also firewalling your federation listener to limit
|
||||
# inbound federation traffic as early as possible, rather than relying
|
||||
|
@ -26,6 +26,7 @@ from six import string_types
|
||||
from twisted.internet import defer
|
||||
|
||||
from synapse.api.constants import (
|
||||
DEFAULT_ROOM_VERSION,
|
||||
KNOWN_ROOM_VERSIONS,
|
||||
EventTypes,
|
||||
JoinRules,
|
||||
@ -106,7 +107,7 @@ class RoomCreationHandler(BaseHandler):
|
||||
if ratelimit:
|
||||
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):
|
||||
raise SynapseError(
|
||||
400,
|
||||
|
Loading…
Reference in New Issue
Block a user