Skip to content

Commit

Permalink
Only include rooms with notifications and unread events in push badge…
Browse files Browse the repository at this point in the history
… counts
  • Loading branch information
Fizzadar committed Mar 17, 2022
1 parent 2877450 commit 129aca1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion synapse/push/push_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ async def get_badge_count(store: DataStore, user_id: str, group_by_room: bool) -
room_id, user_id, last_unread_event_id
)
)
if notifs.notify_count == 0:

# Beeper change: Only count a room as having unread messages if we
# have both unread events (MSC2654) *and* notifications (ie, not muted).
if notifs.notify_count == 0 or notifs.unread_count == 0:
continue

if group_by_room:
Expand Down

0 comments on commit 129aca1

Please sign in to comment.