diff options
author | Erik Johnston <erik@matrix.org> | 2019-05-24 10:36:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 10:36:31 +0100 |
commit | d16f5574b608d7a34d36fafc64676731cb0fcba9 (patch) | |
tree | f76505893562b5e9f18f1bdbcdd05add34558646 /synapse/events | |
parent | Merge pull request #5244 from matrix-org/rav/server_keys/00-factor-out-fetchers (diff) | |
parent | Don't bundle aggs for /state and /members etc APIs (diff) | |
download | synapse-d16f5574b608d7a34d36fafc64676731cb0fcba9.tar.xz |
Merge pull request #5220 from matrix-org/erikj/dont_bundle_live_events
Don't bundle aggregations with events in /sync or /events or state queries
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py index 27a2a9ef98..e2d4384de1 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -330,12 +330,13 @@ class EventClientSerializer(object): ) @defer.inlineCallbacks - def serialize_event(self, event, time_now, **kwargs): + def serialize_event(self, event, time_now, bundle_aggregations=True, **kwargs): """Serializes a single event. Args: event (EventBase) time_now (int): The current time in milliseconds + bundle_aggregations (bool): Whether to bundle in related events **kwargs: Arguments to pass to `serialize_event` Returns: @@ -350,7 +351,7 @@ class EventClientSerializer(object): # If MSC1849 is enabled then we need to look if thre are any relations # we need to bundle in with the event - if self.experimental_msc1849_support_enabled: + if self.experimental_msc1849_support_enabled and bundle_aggregations: annotations = yield self.store.get_aggregation_groups_for_event( event_id, ) |