diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2024-03-05 16:02:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 16:02:54 +0000 |
commit | ab80b3412e314b25827bcc5c61628e024c8cf571 (patch) | |
tree | d74c4bef95f32770905d58f6be9af6b65cadf758 /synapse | |
parent | Ignore notification counts from rooms you've left (#16954) (diff) | |
download | synapse-ab80b3412e314b25827bcc5c61628e024c8cf571.tar.xz |
Revert "Ignore notification counts from rooms you've left" (#16981)
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/databases/main/event_push_actions.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/synapse/storage/databases/main/event_push_actions.py b/synapse/storage/databases/main/event_push_actions.py index 56c549ae66..d7aa8a0ee0 100644 --- a/synapse/storage/databases/main/event_push_actions.py +++ b/synapse/storage/databases/main/event_push_actions.py @@ -404,11 +404,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas SELECT e.room_id, notif_count, e.stream_ordering, e.thread_id, last_receipt_stream_ordering, ev.stream_ordering AS receipt_stream_ordering FROM event_push_summary AS e - INNER JOIN local_current_membership AS lcm ON ( - e.user_id = lcm.user_id - AND e.room_id = lcm.room_id - AND lcm.membership = 'join' - ) + INNER JOIN local_current_membership USING (user_id, room_id) LEFT JOIN receipts_linearized AS r ON ( e.user_id = r.user_id AND e.room_id = r.room_id @@ -476,11 +472,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas SELECT e.room_id, e.stream_ordering, e.thread_id, ev.stream_ordering AS receipt_stream_ordering FROM event_push_actions AS e - INNER JOIN local_current_membership AS lcm ON ( - e.user_id = lcm.user_id - AND e.room_id = lcm.room_id - AND lcm.membership = 'join' - ) + INNER JOIN local_current_membership USING (user_id, room_id) LEFT JOIN receipts_linearized AS r ON ( e.user_id = r.user_id AND e.room_id = r.room_id @@ -522,11 +514,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas SELECT e.room_id, e.stream_ordering, e.thread_id, ev.stream_ordering AS receipt_stream_ordering FROM event_push_actions AS e - INNER JOIN local_current_membership AS lcm ON ( - e.user_id = lcm.user_id - AND e.room_id = lcm.room_id - AND lcm.membership = 'join' - ) + INNER JOIN local_current_membership USING (user_id, room_id) LEFT JOIN receipts_linearized AS r ON ( e.user_id = r.user_id AND e.room_id = r.room_id |