From d0f209e6c6c0f90876ec621e0ecc208c3970dda9 Mon Sep 17 00:00:00 2001 From: Frisk Date: Mon, 13 Jan 2025 21:19:05 +0100 Subject: [PATCH] Ignore the case where the rev-deleted action is an image from teh archive --- src/wiki.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wiki.py b/src/wiki.py index 4c51105..3bbf2c7 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -695,6 +695,8 @@ async def rc_processor(wiki: Wiki, change: dict, changed_categories: dict, displ logparams = change.get('logparams', {"ids": []}) if logparams.get("type", "") == "oldimage": await wiki.redact_images(context, logparams.get("ids", []), logparams.get("new", {}), page_id=change.get("pageid", -1)) + elif logparams.get("type", "") == "filearchive": # Ignore filearchive (past version of the file gets revdeleted) + pass else: await wiki.redact_messages(context, logparams.get("ids", []), "rev_id", logparams.get("new", {}), page_id=change.get("pageid", -1)) await wiki.delete_messages(dict(rev_id=[int(x) for x in logparams.get("ids", [])], message_display=0))