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

Commit a34a41f

Browse files
authored
Fix push for m.read events (#12721)
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 1402159 commit a34a41f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/12721.bugfix

+1
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

+1-1
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)