summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 73177e0bc2..c8b8abc2e7 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1162,16 +1162,17 @@ class EventsStore(SQLBaseStore):
             backfilled (bool): True if the events were backfilled
         """
 
+        # Insert all the push actions into the event_push_actions table.
+        self._set_push_actions_for_event_and_users_txn(
+            txn,
+            events_and_contexts=events_and_contexts,
+        )
+
         if not events_and_contexts:
             # nothing to do here
             return
 
         for event, context in events_and_contexts:
-            # Insert all the push actions into the event_push_actions table.
-            self._set_push_actions_for_event_and_users_txn(
-                txn, event,
-            )
-
             if event.type == EventTypes.Redaction and event.redacts is not None:
                 # Remove the entries in the event_push_actions table for the
                 # redacted event.