Update default room version to 6 (#8461)

Per https://github.com/matrix-org/matrix-doc/pull/2788
pull/8492/head
Richard van der Hoff 2020-10-05 21:40:51 +01:00 committed by GitHub
parent da11cc22be
commit 785437dc0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 3 deletions

1
changelog.d/8461.feature Normal file
View File

@ -0,0 +1 @@
Change default room version to "6", per [MSC2788](https://github.com/matrix-org/matrix-doc/pull/2788).

View File

@ -119,7 +119,7 @@ pid_file: DATADIR/homeserver.pid
# For example, for room version 1, default_room_version should be set
# to "1".
#
#default_room_version: "5"
#default_room_version: "6"
# The GC threshold parameters to pass to `gc.set_threshold`, if defined
#

View File

@ -39,7 +39,7 @@ logger = logging.Logger(__name__)
# in the list.
DEFAULT_BIND_ADDRESSES = ["::", "0.0.0.0"]
DEFAULT_ROOM_VERSION = "5"
DEFAULT_ROOM_VERSION = "6"
ROOM_COMPLEXITY_TOO_GREAT = (
"Your homeserver is unable to join rooms this large or complex. "

View File

@ -21,6 +21,7 @@ from synapse.types import RoomAlias
from synapse.util.stringutils import random_string
from tests import unittest
from tests.unittest import override_config
class DirectoryTestCase(unittest.HomeserverTestCase):
@ -67,10 +68,18 @@ class DirectoryTestCase(unittest.HomeserverTestCase):
self.ensure_user_joined_room()
self.set_alias_via_directory(400, alias_length=256)
def test_state_event_in_room(self):
@override_config({"default_room_version": 5})
def test_state_event_user_in_v5_room(self):
"""Test that a regular user can add alias events before room v6"""
self.ensure_user_joined_room()
self.set_alias_via_state_event(200)
@override_config({"default_room_version": 6})
def test_state_event_v6_room(self):
"""Test that a regular user can *not* add alias events from room v6"""
self.ensure_user_joined_room()
self.set_alias_via_state_event(403)
def test_directory_in_room(self):
self.ensure_user_joined_room()
self.set_alias_via_directory(200)