Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 9f506d8

Browse files
committed
Only check change cache if we know stream ordering
We have receipts without valid events in our database which is supported by synapse for unknown historical reasons (I know).
1 parent 99d21f8 commit 9f506d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synapse/storage/databases/main/event_push_actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def _get_notif_unread_count_for_user_room(
793793

794794
# If there have been no events in the room since the stream ordering,
795795
# there can't be any push actions either.
796-
if not self._events_stream_cache.has_entity_changed(
796+
if stream_ordering and not self._events_stream_cache.has_entity_changed(
797797
room_id, stream_ordering, max_stream_ordering
798798
):
799799
return []

0 commit comments

Comments
 (0)