From 3bfc686d47b886be030ac4e18d64376fb55c8c2f Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 5 May 2021 08:48:44 -0400 Subject: [PATCH 1/3] Include the origin_server_ts of the create event in Spaces Summary. --- synapse/handlers/space_summary.py | 1 + 1 file changed, 1 insertion(+) diff --git a/synapse/handlers/space_summary.py b/synapse/handlers/space_summary.py index 01e3e050f93c..fdc2aaf49e73 100644 --- a/synapse/handlers/space_summary.py +++ b/synapse/handlers/space_summary.py @@ -344,6 +344,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", + "origin_server_ts": create_event.origin_server_ts, "room_type": room_type, } From c9f3fc5cc8cbce4f1686d5e8b5c7187739744522 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 5 May 2021 09:12:59 -0400 Subject: [PATCH 2/3] Newsfragment --- changelog.d/9928.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/9928.bugfix diff --git a/changelog.d/9928.bugfix b/changelog.d/9928.bugfix new file mode 100644 index 000000000000..7b74cd9fb650 --- /dev/null +++ b/changelog.d/9928.bugfix @@ -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. From 26613a7c140afae538b835b868939a5665081ca4 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 5 May 2021 11:44:31 -0400 Subject: [PATCH 3/3] Rename parameter for clarity. --- synapse/handlers/space_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/handlers/space_summary.py b/synapse/handlers/space_summary.py index fdc2aaf49e73..cd262edc05d4 100644 --- a/synapse/handlers/space_summary.py +++ b/synapse/handlers/space_summary.py @@ -344,7 +344,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", - "origin_server_ts": create_event.origin_server_ts, + "creation_ts": create_event.origin_server_ts, "room_type": room_type, }