diff options
author | Quentin Gliech <quenting@element.io> | 2023-03-06 17:08:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 16:08:39 +0000 |
commit | 41f127e06861230024f43aa4ce272116dc886700 (patch) | |
tree | d474017658d613ecf54eac865fd44d521356a9b5 /synapse/rest/client/notifications.py | |
parent | Stop applying edits to event contents (MSC3925). (#15193) (diff) | |
download | synapse-41f127e06861230024f43aa4ce272116dc886700.tar.xz |
Pass the requester during event serialization. (#15174)
This allows Synapse to properly include the transaction ID in the unsigned data of events.
Diffstat (limited to 'synapse/rest/client/notifications.py')
-rw-r--r-- | synapse/rest/client/notifications.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/rest/client/notifications.py b/synapse/rest/client/notifications.py index 61268e3af1..ea10042569 100644 --- a/synapse/rest/client/notifications.py +++ b/synapse/rest/client/notifications.py @@ -72,6 +72,12 @@ class NotificationsServlet(RestServlet): next_token = None + serialize_options = SerializeEventConfig( + event_format=format_event_for_client_v2_without_room_id, + requester=requester, + ) + now = self.clock.time_msec() + for pa in push_actions: returned_pa = { "room_id": pa.room_id, @@ -81,10 +87,8 @@ class NotificationsServlet(RestServlet): "event": ( self._event_serializer.serialize_event( notif_events[pa.event_id], - self.clock.time_msec(), - config=SerializeEventConfig( - event_format=format_event_for_client_v2_without_room_id - ), + now, + config=serialize_options, ) ), } |