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

Commit

Permalink
Include the time of the create event in Spaces Summary. (#9928)
Browse files Browse the repository at this point in the history
This is an update based on changes to MSC2946. The origin_server_ts
of the m.room.create event is copied into the creation_ts field for each
room returned from the spaces summary.
  • Loading branch information
clokep authored May 5, 2021
1 parent 37623e3 commit d783880
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/9928.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include the `origin_server_ts` property in the experimental [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946) support to allow clients to properly sort rooms.
1 change: 1 addition & 0 deletions synapse/handlers/space_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ async def _build_room_entry(self, room_id: str) -> JsonDict:
stats["history_visibility"] == HistoryVisibility.WORLD_READABLE
),
"guest_can_join": stats["guest_access"] == "can_join",
"creation_ts": create_event.origin_server_ts,
"room_type": room_type,
}

Expand Down

0 comments on commit d783880

Please sign in to comment.