This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
synapse/storage/databases/main Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1+ Fix a bug introduced in v1.20.0rc1 causing some features related to notifications to misbehave following the implementation of unread counts.
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ async def get_push_action_users_in_range(
196196 def f (txn ):
197197 sql = (
198198 "SELECT DISTINCT(user_id) FROM event_push_actions WHERE"
199- " stream_ordering >= ? AND stream_ordering <= ?"
199+ " stream_ordering >= ? AND stream_ordering <= ? AND notif = 1 "
200200 )
201201 txn .execute (sql , (min_stream_ordering , max_stream_ordering ))
202202 return [r [0 ] for r in txn ]
@@ -644,7 +644,7 @@ def f(txn):
644644 "SELECT e.received_ts"
645645 " FROM event_push_actions AS ep"
646646 " JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id"
647- " WHERE ep.stream_ordering > ?"
647+ " WHERE ep.stream_ordering > ? AND notif = 1 "
648648 " ORDER BY ep.stream_ordering ASC"
649649 " LIMIT 1"
650650 )
@@ -708,6 +708,7 @@ def f(txn):
708708 " FROM event_push_actions epa, events e"
709709 " WHERE epa.event_id = e.event_id"
710710 " AND epa.user_id = ? %s"
711+ " AND epa.notif = 1"
711712 " ORDER BY epa.stream_ordering DESC"
712713 " LIMIT ?" % (before_clause ,)
713714 )
You can’t perform that action at this time.
0 commit comments