mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 22:53:52 +01:00
Remove support for unstable MSC1772 prefixes. (#10161)
The stable prefixes have been supported since v1.34.0. The unstable prefixes are not supported by any known clients.
This commit is contained in:
parent
9e5ab6dd58
commit
4911f7931d
3 changed files with 4 additions and 16 deletions
1
changelog.d/10161.removal
Normal file
1
changelog.d/10161.removal
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Stop supporting the unstable spaces prefixes from MSC1772.
|
|
@ -112,8 +112,6 @@ class EventTypes:
|
||||||
|
|
||||||
SpaceChild = "m.space.child"
|
SpaceChild = "m.space.child"
|
||||||
SpaceParent = "m.space.parent"
|
SpaceParent = "m.space.parent"
|
||||||
MSC1772_SPACE_CHILD = "org.matrix.msc1772.space.child"
|
|
||||||
MSC1772_SPACE_PARENT = "org.matrix.msc1772.space.parent"
|
|
||||||
|
|
||||||
|
|
||||||
class ToDeviceEventTypes:
|
class ToDeviceEventTypes:
|
||||||
|
@ -180,7 +178,6 @@ class EventContentFields:
|
||||||
|
|
||||||
# cf https://github.com/matrix-org/matrix-doc/pull/1772
|
# cf https://github.com/matrix-org/matrix-doc/pull/1772
|
||||||
ROOM_TYPE = "type"
|
ROOM_TYPE = "type"
|
||||||
MSC1772_ROOM_TYPE = "org.matrix.msc1772.type"
|
|
||||||
|
|
||||||
|
|
||||||
class RoomEncryptionAlgorithms:
|
class RoomEncryptionAlgorithms:
|
||||||
|
|
|
@ -402,10 +402,7 @@ class SpaceSummaryHandler:
|
||||||
return (), ()
|
return (), ()
|
||||||
|
|
||||||
return res.rooms, tuple(
|
return res.rooms, tuple(
|
||||||
ev.data
|
ev.data for ev in res.events if ev.event_type == EventTypes.SpaceChild
|
||||||
for ev in res.events
|
|
||||||
if ev.event_type == EventTypes.MSC1772_SPACE_CHILD
|
|
||||||
or ev.event_type == EventTypes.SpaceChild
|
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _is_room_accessible(
|
async def _is_room_accessible(
|
||||||
|
@ -514,11 +511,6 @@ class SpaceSummaryHandler:
|
||||||
current_state_ids[(EventTypes.Create, "")]
|
current_state_ids[(EventTypes.Create, "")]
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: update once MSC1772 lands
|
|
||||||
room_type = create_event.content.get(EventContentFields.ROOM_TYPE)
|
|
||||||
if not room_type:
|
|
||||||
room_type = create_event.content.get(EventContentFields.MSC1772_ROOM_TYPE)
|
|
||||||
|
|
||||||
room_version = await self._store.get_room_version(room_id)
|
room_version = await self._store.get_room_version(room_id)
|
||||||
allowed_spaces = None
|
allowed_spaces = None
|
||||||
if await self._event_auth_handler.has_restricted_join_rules(
|
if await self._event_auth_handler.has_restricted_join_rules(
|
||||||
|
@ -540,7 +532,7 @@ class SpaceSummaryHandler:
|
||||||
),
|
),
|
||||||
"guest_can_join": stats["guest_access"] == "can_join",
|
"guest_can_join": stats["guest_access"] == "can_join",
|
||||||
"creation_ts": create_event.origin_server_ts,
|
"creation_ts": create_event.origin_server_ts,
|
||||||
"room_type": room_type,
|
"room_type": create_event.content.get(EventContentFields.ROOM_TYPE),
|
||||||
"allowed_spaces": allowed_spaces,
|
"allowed_spaces": allowed_spaces,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,9 +561,7 @@ class SpaceSummaryHandler:
|
||||||
[
|
[
|
||||||
event_id
|
event_id
|
||||||
for key, event_id in current_state_ids.items()
|
for key, event_id in current_state_ids.items()
|
||||||
# TODO: update once MSC1772 has been FCP for a period of time.
|
if key[0] == EventTypes.SpaceChild
|
||||||
if key[0] == EventTypes.MSC1772_SPACE_CHILD
|
|
||||||
or key[0] == EventTypes.SpaceChild
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue