Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 785437d

Browse files
authored
Update default room version to 6 (#8461)
Per matrix-org/matrix-spec-proposals#2788
1 parent da11cc2 commit 785437d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

changelog.d/8461.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Change default room version to "6", per [MSC2788](https://github.com/matrix-org/matrix-doc/pull/2788).

docs/sample_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pid_file: DATADIR/homeserver.pid
119119
# For example, for room version 1, default_room_version should be set
120120
# to "1".
121121
#
122-
#default_room_version: "5"
122+
#default_room_version: "6"
123123

124124
# The GC threshold parameters to pass to `gc.set_threshold`, if defined
125125
#

synapse/config/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# in the list.
4040
DEFAULT_BIND_ADDRESSES = ["::", "0.0.0.0"]
4141

42-
DEFAULT_ROOM_VERSION = "5"
42+
DEFAULT_ROOM_VERSION = "6"
4343

4444
ROOM_COMPLEXITY_TOO_GREAT = (
4545
"Your homeserver is unable to join rooms this large or complex. "

tests/rest/client/v1/test_directory.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from synapse.util.stringutils import random_string
2222

2323
from tests import unittest
24+
from tests.unittest import override_config
2425

2526

2627
class DirectoryTestCase(unittest.HomeserverTestCase):
@@ -67,10 +68,18 @@ def test_directory_in_room_too_long(self):
6768
self.ensure_user_joined_room()
6869
self.set_alias_via_directory(400, alias_length=256)
6970

70-
def test_state_event_in_room(self):
71+
@override_config({"default_room_version": 5})
72+
def test_state_event_user_in_v5_room(self):
73+
"""Test that a regular user can add alias events before room v6"""
7174
self.ensure_user_joined_room()
7275
self.set_alias_via_state_event(200)
7376

77+
@override_config({"default_room_version": 6})
78+
def test_state_event_v6_room(self):
79+
"""Test that a regular user can *not* add alias events from room v6"""
80+
self.ensure_user_joined_room()
81+
self.set_alias_via_state_event(403)
82+
7483
def test_directory_in_room(self):
7584
self.ensure_user_joined_room()
7685
self.set_alias_via_directory(200)

0 commit comments

Comments
 (0)