mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Refactor _set_push_actions_for_event_and_users_txn to use events_and_contexts
This commit is contained in:
parent
324c3e9399
commit
ad0ccf15ea
2 changed files with 42 additions and 34 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue