From 4e9058dd5f7ba515d82ff20385d8e4d598879ca2 Mon Sep 17 00:00:00 2001 From: Markus Ressel Date: Fri, 29 Nov 2024 01:32:17 +0100 Subject: [PATCH] add TODO --- keel_telegram_bot/bot/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/keel_telegram_bot/bot/__init__.py b/keel_telegram_bot/bot/__init__.py index 79c022d..ff0731c 100644 --- a/keel_telegram_bot/bot/__init__.py +++ b/keel_telegram_bot/bot/__init__.py @@ -790,6 +790,13 @@ async def update_messages(self): approvals = self._api_client.get_approvals() for approval in approvals: + + if approval.archived or approval.rejected: + # TODO: avoid updating archived (accepted) or rejected items + # to reduce the number of API calls to the Telegram API + pass + #continue + approval_id = approval.id approval_identifier = approval.identifier key = f"{approval_id}_{approval_identifier}"