From 4b07ad90652972ff768163beaa8962bc82fd4eb6 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 11 Jan 2022 21:16:49 +0000 Subject: [PATCH] Add extra checks for getting messages --- handler/agora.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler/agora.py b/handler/agora.py index 0997cef..9f6f0b3 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -170,6 +170,9 @@ class Agora(object): messages = self.agora.recent_messages() if not messages["success"]: return False + if not "data" in messages["response"]: + self.log.error("Data not in messages response: {content}", content=messages["response"]) + return False open_tx = self.tx.get_ref_map().keys() for message in messages["response"]["data"]["message_list"]: contact_id = message["contact_id"]