mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:44:56 -04:00
Include bundled aggregations in /sync and related fixes (#11478)
Due to updates to MSC2675 this includes a few fixes: * Include bundled aggregations for /sync. * Do not include bundled aggregations for /initialSync and /events. * Do not bundle aggregations for state events. * Clarifies comments and variable names.
This commit is contained in:
parent
a77c369897
commit
494ebd7347
10 changed files with 169 additions and 101 deletions
|
@ -224,14 +224,13 @@ class RelationPaginationServlet(RestServlet):
|
|||
)
|
||||
|
||||
now = self.clock.time_msec()
|
||||
# We set bundle_relations to False when retrieving the original
|
||||
# event because we want the content before relations were applied to
|
||||
# it.
|
||||
# Do not bundle aggregations when retrieving the original event because
|
||||
# we want the content before relations are applied to it.
|
||||
original_event = await self._event_serializer.serialize_event(
|
||||
event, now, bundle_relations=False
|
||||
event, now, bundle_aggregations=False
|
||||
)
|
||||
# The relations returned for the requested event do include their
|
||||
# bundled relations.
|
||||
# bundled aggregations.
|
||||
serialized_events = await self._event_serializer.serialize_events(events, now)
|
||||
|
||||
return_value = pagination_chunk.to_dict()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue