summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-11-30 11:33:33 -0500
committerGitHub <noreply@github.com>2021-11-30 11:33:33 -0500
commit379f2650cf875f50c59524147ec0e33cfd5ef60c (patch)
treed55df4d11062d77875088e84039bd6c7474b8287 /synapse/rest
parentFix `LruCache` corruption bug with a `size_callback` that can return 0 (#11454) (diff)
downloadsynapse-379f2650cf875f50c59524147ec0e33cfd5ef60c.tar.xz
Bundle relations of relations into the `/relations` result. (#11284)
Per updates to MSC2675 which now states that bundled
aggregations should be included from the `/relations`
endpoint.
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/relations.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/rest/client/relations.py b/synapse/rest/client/relations.py
index 45e9f1dd90..b1a3304849 100644
--- a/synapse/rest/client/relations.py
+++ b/synapse/rest/client/relations.py
@@ -230,12 +230,9 @@ class RelationPaginationServlet(RestServlet):
         original_event = await self._event_serializer.serialize_event(
             event, now, bundle_relations=False
         )
-        # Similarly, we don't allow relations to be applied to relations, so we
-        # return the original relations without any aggregations on top of them
-        # here.
-        serialized_events = await self._event_serializer.serialize_events(
-            events, now, bundle_relations=False
-        )
+        # The relations returned for the requested event do include their
+        # bundled relations.
+        serialized_events = await self._event_serializer.serialize_events(events, now)
 
         return_value = pagination_chunk.to_dict()
         return_value["chunk"] = serialized_events