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

Commit b4e0a3e

Browse files
committed
Fix push for m.read events
badge_count_last_call was always zero when the response for push notifications included a "rejected" key which mapped to an empty list.
1 parent 17e1eb7 commit b4e0a3e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/12721.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix push to dismiss notifications when read on another client. Contributed by @SpiritCroc @ Beeper.

synapse/push/httppusher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ async def dispatch_push(
405405
rejected = []
406406
if "rejected" in resp:
407407
rejected = resp["rejected"]
408-
else:
408+
if not rejected:
409409
self.badge_count_last_call = badge
410410
return rejected
411411

0 commit comments

Comments
 (0)