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

This commit is contained in:
Patrick Cloke 2021-08-20 07:17:50 -04:00 committed by GitHub
parent ce6819a701
commit 5cda75fede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -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.

View File

@ -293,7 +293,7 @@ MSC3244_CAPABILITIES = {
),
RoomVersionCapability(
"restricted",
None,
RoomVersions.V8,
lambda room_version: room_version.msc3083_join_rules,
),
)

View File

@ -37,7 +37,7 @@ class ExperimentalConfig(Config):
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)

View File

@ -102,7 +102,8 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
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)
@ -120,7 +121,6 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase):
"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"