summary refs log tree commit diff
path: root/synapse/rest/client/v1
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-03-16 10:27:51 +0000
committerGitHub <noreply@github.com>2021-03-16 10:27:51 +0000
commit1b0eaed21f38a5e84089df4ba2fb881fc1242a2e (patch)
tree1b64bb63417e69bed3a3eeb2f7ddd6e60cb58f56 /synapse/rest/client/v1
parentFix Internal Server Error on `GET /saml2/authn_response` (#9623) (diff)
downloadsynapse-1b0eaed21f38a5e84089df4ba2fb881fc1242a2e.tar.xz
Prevent bundling aggregations for state events (#9619)
There's no need to do aggregation bundling for state events. Doing so can cause performance issues.
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r--synapse/rest/client/v1/room.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 9a1df30c29..5884daea6d 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -671,7 +671,10 @@ class RoomEventContextServlet(RestServlet):
             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