diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-01-21 05:31:31 -0500 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2022-01-21 10:40:34 +0000 |
commit | 7a11509d17f56b8711a3bda11491b3a5a42a2f67 (patch) | |
tree | 75c44a76c4ef2398db67b7181230bc3c9cfa6e06 /synapse/rest/admin/rooms.py | |
parent | Correctly await on_logged_out callbacks (#11786) (diff) | |
download | synapse-7a11509d17f56b8711a3bda11491b3a5a42a2f67.tar.xz |
Do not try to serialize raw aggregations dict. (#11791)
Diffstat (limited to 'synapse/rest/admin/rooms.py')
-rw-r--r-- | synapse/rest/admin/rooms.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/synapse/rest/admin/rooms.py b/synapse/rest/admin/rooms.py index 2e714ac87b..efe25fe7eb 100644 --- a/synapse/rest/admin/rooms.py +++ b/synapse/rest/admin/rooms.py @@ -744,20 +744,15 @@ class RoomEventContextServlet(RestServlet): ) time_now = self.clock.time_msec() + aggregations = results.pop("aggregations", None) results["events_before"] = self._event_serializer.serialize_events( - results["events_before"], - time_now, - bundle_aggregations=results["aggregations"], + results["events_before"], time_now, bundle_aggregations=aggregations ) results["event"] = self._event_serializer.serialize_event( - results["event"], - time_now, - bundle_aggregations=results["aggregations"], + results["event"], time_now, bundle_aggregations=aggregations ) results["events_after"] = self._event_serializer.serialize_events( - results["events_after"], - time_now, - bundle_aggregations=results["aggregations"], + results["events_after"], time_now, bundle_aggregations=aggregations ) results["state"] = self._event_serializer.serialize_events( results["state"], time_now |