diff options
author | Patrick Cloke <patrickc@matrix.org> | 2022-03-16 12:22:07 -0400 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2022-03-16 12:22:07 -0400 |
commit | 3f7cfbc9e5e82d17cd7782adcbe78e239aae5691 (patch) | |
tree | 35aaeba932f2ab5bd614ab9a946fe7967b6fca3e /synapse/events/utils.py | |
parent | Handle cancellation in `DatabasePool.runInteraction()` (#12199) (diff) | |
parent | Re-generate changelog. (diff) | |
download | synapse-3f7cfbc9e5e82d17cd7782adcbe78e239aae5691.tar.xz |
Merge branch 'release-v1.55' into develop
Diffstat (limited to 'synapse/events/utils.py')
-rw-r--r-- | synapse/events/utils.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py index b2a237c1e0..a0520068e0 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -530,9 +530,12 @@ class EventClientSerializer: # Include the bundled aggregations in the event. if serialized_aggregations: - serialized_event["unsigned"].setdefault("m.relations", {}).update( - serialized_aggregations - ) + # There is likely already an "unsigned" field, but a filter might + # have stripped it off (via the event_fields option). The server is + # allowed to return additional fields, so add it back. + serialized_event.setdefault("unsigned", {}).setdefault( + "m.relations", {} + ).update(serialized_aggregations) def serialize_events( self, |