Remove support for MSC3244: Room version capabilities as the MSC was rejected. (#19429)

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
This commit is contained in:
Olivier 'reivilibre authored and GitHub committed 2026-02-05 11:01:15 +00:00
1 parent 8d4ebc27c2
commit f6105b73f0
5 files changed
+2 -87

No files matched your search

-38
View File
@@ -18,7 +18,6 @@
#
#
from typing import Callable
import attr
@@ -496,40 +495,3 @@ KNOWN_ROOM_VERSIONS: dict[str, RoomVersion] = {
RoomVersions.HydraV11,
)
}
@attr.s(slots=True, frozen=True, auto_attribs=True)
class RoomVersionCapability:
"""An object which describes the unique attributes of a room version."""
identifier: str # the identifier for this capability
preferred_version: RoomVersion | None
support_check_lambda: Callable[[RoomVersion], bool]
MSC3244_CAPABILITIES = {
cap.identifier: {
"preferred": (
cap.preferred_version.identifier
if cap.preferred_version is not None
else None
),
"support": [
v.identifier
for v in KNOWN_ROOM_VERSIONS.values()
if cap.support_check_lambda(v)
],
}
for cap in (
RoomVersionCapability(
"knock",
RoomVersions.V7,
lambda room_version: room_version.knock_join_rule,
),
RoomVersionCapability(
"restricted",
RoomVersions.V9,
lambda room_version: room_version.restricted_join_rule,
),
)
}