mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-25 11:05:49 +03:00
Ignore notification counts from rooms you've left (#16954)
Co-authored-by: reivilibre <oliverw@matrix.org>
This commit is contained in:
parent
8de3283ebe
commit
274f289a52
2 changed files with 16 additions and 3 deletions
1
changelog.d/16954.bugfix
Normal file
1
changelog.d/16954.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix a bug introduced in v1.100.0 where notifications from rooms you've left would continue to be counted.
|
|
@ -404,7 +404,11 @@ 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 USING (user_id, room_id)
|
||||
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'
|
||||
)
|
||||
LEFT JOIN receipts_linearized AS r ON (
|
||||
e.user_id = r.user_id
|
||||
AND e.room_id = r.room_id
|
||||
|
@ -472,7 +476,11 @@ 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 USING (user_id, room_id)
|
||||
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'
|
||||
)
|
||||
LEFT JOIN receipts_linearized AS r ON (
|
||||
e.user_id = r.user_id
|
||||
AND e.room_id = r.room_id
|
||||
|
@ -514,7 +522,11 @@ 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 USING (user_id, room_id)
|
||||
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'
|
||||
)
|
||||
LEFT JOIN receipts_linearized AS r ON (
|
||||
e.user_id = r.user_id
|
||||
AND e.room_id = r.room_id
|
||||
|
|
Loading…
Reference in a new issue