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

Commit

Permalink
Update default room version to 6 (#8461)
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Oct 5, 2020
1 parent da11cc2 commit 785437d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/8461.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change default room version to "6", per [MSC2788](https://github.com/matrix-org/matrix-doc/pull/2788).
2 changes: 1 addition & 1 deletion docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# 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. "
Expand Down
11 changes: 10 additions & 1 deletion tests/rest/client/v1/test_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from synapse.util.stringutils import random_string

from tests import unittest
from tests.unittest import override_config


class DirectoryTestCase(unittest.HomeserverTestCase):
Expand Down Expand Up @@ -67,10 +68,18 @@ def test_directory_in_room_too_long(self):
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)
Expand Down

0 comments on commit 785437d

Please sign in to comment.