From 8975fa180bbe8672ebd020aa0f3c5d401634d916 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 30 Jul 2024 16:43:51 +0100 Subject: [PATCH] Add GCM response log --- sygnal/gcmpushkin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sygnal/gcmpushkin.py b/sygnal/gcmpushkin.py index c0e873da..7b7383dd 100644 --- a/sygnal/gcmpushkin.py +++ b/sygnal/gcmpushkin.py @@ -511,6 +511,12 @@ def _handle_v1_response( log.info("Reg IDs %r get 404 response; assuming unregistered", pushkeys) return pushkeys, [] elif 200 <= response.code < 300: + try: + resp_object = json_decoder.decode(response_text) + except ValueError: + resp_object = None + # Beeper: log responses + log.info("Sent GCM push, response=%r", resp_object) return [], [] else: raise NotificationDispatchException(