mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-31 06:14:23 -04:00
fix: Push notifications for invite over federation (#13719)
This commit is contained in:
parent
5c429b86b4
commit
6caa303083
8 changed files with 42 additions and 23 deletions
|
@ -2134,13 +2134,13 @@ class PersistEventsStore:
|
|||
appear in events_and_context.
|
||||
"""
|
||||
|
||||
# Only non outlier events will have push actions associated with them,
|
||||
# Only notifiable events will have push actions associated with them,
|
||||
# so let's filter them out. (This makes joining large rooms faster, as
|
||||
# these queries took seconds to process all the state events).
|
||||
non_outlier_events = [
|
||||
notifiable_events = [
|
||||
event
|
||||
for event, _ in events_and_contexts
|
||||
if not event.internal_metadata.is_outlier()
|
||||
if event.internal_metadata.is_notifiable()
|
||||
]
|
||||
|
||||
sql = """
|
||||
|
@ -2153,7 +2153,7 @@ class PersistEventsStore:
|
|||
WHERE event_id = ?
|
||||
"""
|
||||
|
||||
if non_outlier_events:
|
||||
if notifiable_events:
|
||||
txn.execute_batch(
|
||||
sql,
|
||||
(
|
||||
|
@ -2163,7 +2163,7 @@ class PersistEventsStore:
|
|||
event.depth,
|
||||
event.event_id,
|
||||
)
|
||||
for event in non_outlier_events
|
||||
for event in notifiable_events
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue