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

Commit

Permalink
Set room version 8 as preferred for restricted rooms. (#10571)
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep authored Aug 20, 2021
1 parent ce6819a commit 5cda75f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
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,7 +37,7 @@ 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)

# MSC3266 (room summary api)
self.msc3266_enabled: bool = experimental.get("msc3266_enabled", False)
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 @@ -102,7 +102,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 @@ -120,7 +121,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

0 comments on commit 5cda75f

Please sign in to comment.