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

Prevent bundling aggregations for state events #9619

Merged
merged 3 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/9619.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent attempting to bundle aggregations for state events in /context APIs.
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 4 additions & 1 deletion synapse/rest/admin/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,10 @@ async def on_GET(
results["events_after"], time_now
)
results["state"] = await self._event_serializer.serialize_events(
results["state"], time_now
results["state"],
time_now,
# No need to bundle aggregations for state events
bundle_aggregations=False,
)

return 200, results
5 changes: 4 additions & 1 deletion synapse/rest/client/v1/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,10 @@ async def on_GET(self, request, room_id, event_id):
results["events_after"], time_now
)
results["state"] = await self._event_serializer.serialize_events(
results["state"], time_now
results["state"],
time_now,
# No need to bundle aggregations for state events
bundle_aggregations=False,
)

return 200, results
Expand Down