Include the time of the create event in Spaces Summary. (#9928)

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.
This commit is contained in:
Patrick Cloke 2021-05-05 13:33:05 -04:00 committed by GitHub
parent 37623e3382
commit d783880083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

1
changelog.d/9928.bugfix Normal file
View File

@ -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.

View File

@ -347,6 +347,7 @@ class SpaceSummaryHandler:
stats["history_visibility"] == HistoryVisibility.WORLD_READABLE stats["history_visibility"] == HistoryVisibility.WORLD_READABLE
), ),
"guest_can_join": stats["guest_access"] == "can_join", "guest_can_join": stats["guest_access"] == "can_join",
"creation_ts": create_event.origin_server_ts,
"room_type": room_type, "room_type": room_type,
} }