From de937dc2f3ee51e6ebe508cb69e3ffa6e536b482 Mon Sep 17 00:00:00 2001 From: Pera Pisar Date: Mon, 11 Mar 2024 18:13:14 +0000 Subject: [PATCH] Return the maximum ID of all abuse log entries instead of the last ID. This fixes an issue where abuse log entries are returned out of order from the API, leading to constantly repeating abuse filter messages being sent to Discord. --- src/wiki.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wiki.py b/src/wiki.py index 2f7e770..9c09878 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -232,7 +232,7 @@ class Wiki(object): if entry["id"] <= recent_id: continue self.abuse_processor(entry) - return entry["id"] + return max([entry["id"] for entry in abuse_log]) def fetch_changes(self, amount): """Fetches the :amount: of changes from the wiki.