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

Commit

Permalink
Fix push for m.read events
Browse files Browse the repository at this point in the history
badge_count_last_call was always zero when the response for push
notifications included a "rejected" key which mapped to an empty list.
  • Loading branch information
SpiritCroc committed May 16, 2022
1 parent 17e1eb7 commit b4e0a3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/12721.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix push to dismiss notifications when read on another client. Contributed by @SpiritCroc @ Beeper.
2 changes: 1 addition & 1 deletion synapse/push/httppusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ async def dispatch_push(
rejected = []
if "rejected" in resp:
rejected = resp["rejected"]
else:
if not rejected:
self.badge_count_last_call = badge
return rejected

Expand Down

0 comments on commit b4e0a3e

Please sign in to comment.