Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Support stable spaces prefixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Apr 30, 2021
1 parent d11f2df commit 872017a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/9915.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support stable identifiers from [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772).
2 changes: 2 additions & 0 deletions synapse/api/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ class EventTypes:

Dummy = "org.matrix.dummy_event"

SpaceChild = "m.space.child"
SpaceParent = "m.space.parent"
MSC1772_SPACE_CHILD = "org.matrix.msc1772.space.child"
MSC1772_SPACE_PARENT = "org.matrix.msc1772.space.parent"

Expand Down
4 changes: 3 additions & 1 deletion synapse/handlers/space_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ async def _summarize_remote_room(
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:
Expand Down Expand Up @@ -360,8 +361,9 @@ async def _get_child_events(self, room_id: str) -> Iterable[EventBase]:
[
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
]
)

Expand Down

0 comments on commit 872017a

Please sign in to comment.