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.
pull/12498/head
SpiritCroc 2022-05-17 12:03:07 +02:00 committed by GitHub
parent 1402159bb8
commit a34a41f135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/12721.bugfix Normal file
View File

@ -0,0 +1 @@
Fix push to dismiss notifications when read on another client. Contributed by @SpiritCroc @ Beeper.

View File

@ -405,7 +405,7 @@ class HttpPusher(Pusher):
rejected = []
if "rejected" in resp:
rejected = resp["rejected"]
else:
if not rejected:
self.badge_count_last_call = badge
return rejected