diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-05-05 11:56:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 11:56:51 -0400 |
commit | e2a443550e7b47bf8fe1b5fbd76f9ca95e81cbad (patch) | |
tree | d10547a4210bcaa3dadb8766dd2fd7dff4a94153 /synapse/handlers | |
parent | Optionally track memory usage of each LruCache (#9881) (diff) | |
download | synapse-e2a443550e7b47bf8fe1b5fbd76f9ca95e81cbad.tar.xz |
Support stable MSC1772 spaces identifiers. (#9915)
Support both the unstable and stable identifiers. A future release will disable the unstable identifiers.
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/space_summary.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/space_summary.py b/synapse/handlers/space_summary.py index 01e3e050f9..d32452747c 100644 --- a/synapse/handlers/space_summary.py +++ b/synapse/handlers/space_summary.py @@ -288,6 +288,7 @@ class SpaceSummaryHandler: ev.data for ev in res.events if ev.event_type == EventTypes.MSC1772_SPACE_CHILD + or ev.event_type == EventTypes.SpaceChild ) async def _is_room_accessible(self, room_id: str, requester: Optional[str]) -> bool: @@ -331,7 +332,9 @@ class SpaceSummaryHandler: ) # TODO: update once MSC1772 lands - room_type = create_event.content.get(EventContentFields.MSC1772_ROOM_TYPE) + room_type = create_event.content.get(EventContentFields.ROOM_TYPE) + if not room_type: + room_type = create_event.content.get(EventContentFields.MSC1772_ROOM_TYPE) entry = { "room_id": stats["room_id"], @@ -360,8 +363,9 @@ class SpaceSummaryHandler: [ event_id for key, event_id in current_state_ids.items() - # TODO: update once MSC1772 lands + # TODO: update once MSC1772 has been FCP for a period of time. if key[0] == EventTypes.MSC1772_SPACE_CHILD + or key[0] == EventTypes.SpaceChild ] ) |