summary refs log tree commit diff
path: root/synapse/rest/client/notifications.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-03-03 10:43:06 -0500
committerGitHub <noreply@github.com>2022-03-03 10:43:06 -0500
commit1d11b452b70c768e4919bd9cf6bcaeda2050a3d4 (patch)
tree772b95de8e7ec9714b9e6334088174abad0a9222 /synapse/rest/client/notifications.py
parentEnable MSC2716 Complement tests in Synapse (#12145) (diff)
downloadsynapse-1d11b452b70c768e4919bd9cf6bcaeda2050a3d4.tar.xz
Use the proper serialization format when bundling aggregations. (#12090)
This ensures that the `latest_event` field of the bundled aggregation
for threads uses the same format as the other events in the response.
Diffstat (limited to 'synapse/rest/client/notifications.py')
-rw-r--r--synapse/rest/client/notifications.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/rest/client/notifications.py b/synapse/rest/client/notifications.py
index 20377a9ac6..ff040de6b8 100644
--- a/synapse/rest/client/notifications.py
+++ b/synapse/rest/client/notifications.py
@@ -16,7 +16,10 @@ import logging
 from typing import TYPE_CHECKING, Tuple
 
 from synapse.api.constants import ReceiptTypes
-from synapse.events.utils import format_event_for_client_v2_without_room_id
+from synapse.events.utils import (
+    SerializeEventConfig,
+    format_event_for_client_v2_without_room_id,
+)
 from synapse.http.server import HttpServer
 from synapse.http.servlet import RestServlet, parse_integer, parse_string
 from synapse.http.site import SynapseRequest
@@ -75,7 +78,9 @@ class NotificationsServlet(RestServlet):
                     self._event_serializer.serialize_event(
                         notif_events[pa.event_id],
                         self.clock.time_msec(),
-                        event_format=format_event_for_client_v2_without_room_id,
+                        config=SerializeEventConfig(
+                            event_format=format_event_for_client_v2_without_room_id
+                        ),
                     )
                 ),
             }