summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2022-03-16 12:22:07 -0400
committerPatrick Cloke <patrickc@matrix.org>2022-03-16 12:22:07 -0400
commit3f7cfbc9e5e82d17cd7782adcbe78e239aae5691 (patch)
tree35aaeba932f2ab5bd614ab9a946fe7967b6fca3e /synapse
parentHandle cancellation in `DatabasePool.runInteraction()` (#12199) (diff)
parentRe-generate changelog. (diff)
downloadsynapse-3f7cfbc9e5e82d17cd7782adcbe78e239aae5691.tar.xz
Merge branch 'release-v1.55' into develop
Diffstat (limited to 'synapse')
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/events/utils.py9
2 files changed, 7 insertions, 4 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index 4b00565976..870707f476 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -68,7 +68,7 @@ try:
 except ImportError:
     pass
 
-__version__ = "1.54.0"
+__version__ = "1.55.0rc1"
 
 if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
     # We import here so that we don't have to install a bunch of deps when
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,