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

Set room version 8 as preferred for restricted rooms. #10571

Merged
merged 5 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10571.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable room capabilities ([MSC3244](https://github.com/matrix-org/matrix-doc/pull/3244)) by default and set room version 8 as the preferred room version for restricted rooms.
2 changes: 1 addition & 1 deletion synapse/api/room_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class RoomVersionCapability:
),
RoomVersionCapability(
"restricted",
None,
RoomVersions.V8,
lambda room_version: room_version.msc3083_join_rules,
),
)
Expand Down
2 changes: 1 addition & 1 deletion synapse/config/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def read_config(self, config: JsonDict, **kwargs):
self.msc2285_enabled: bool = experimental.get("msc2285_enabled", False)

# MSC3244 (room version capabilities)
self.msc3244_enabled: bool = experimental.get("msc3244_enabled", False)
self.msc3244_enabled: bool = experimental.get("msc3244_enabled", True)
4 changes: 2 additions & 2 deletions tests/rest/client/v2_alpha/test_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def test_get_change_password_capabilities_password_disabled(self):
self.assertEqual(channel.code, 200)
self.assertFalse(capabilities["m.change_password"]["enabled"])

def test_get_does_not_include_msc3244_fields_by_default(self):
@override_config({"experimental_features": {"msc3244_enabled": False}})
def test_get_does_not_include_msc3244_fields_when_disabled(self):
localpart = "user"
password = "pass"
user = self.register_user(localpart, password)
Expand All @@ -121,7 +122,6 @@ def test_get_does_not_include_msc3244_fields_by_default(self):
"org.matrix.msc3244.room_capabilities", capabilities["m.room_versions"]
)

@override_config({"experimental_features": {"msc3244_enabled": True}})
def test_get_does_include_msc3244_fields_when_enabled(self):
localpart = "user"
password = "pass"
Expand Down