From 5b9e70df6b028472077a8e69761436f3866e194e Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 12 May 2022 16:12:17 +0200 Subject: [PATCH] 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. --- synapse/push/httppusher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index 5818344520f5..d5603596c004 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -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