mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 06:32:54 +00:00
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:
1 parent
8d4ebc27c2
commit
f6105b73f0
5 files changed
+2
-87
No files matched your search
@@ -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,
|
||||
),
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user