From 6a267d3463469858ac72eac2ce88204fe84c58dd Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Fri, 19 Aug 2022 00:13:23 +0200 Subject: [PATCH] Tweak old inbox data pruning --- app/prune.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/prune.py b/app/prune.py index d779ba3..8cb5814 100644 --- a/app/prune.py +++ b/app/prune.py @@ -57,12 +57,12 @@ async def _prune_old_inbox_objects( models.InboxObject.announced_via_outbox_object_ap_id.is_(None), # Keep objects related to local conversations or_( - models.InboxObject.conversation.not_like(f"{BASE_URL}/%"), + models.InboxObject.conversation.not_like(f"{BASE_URL}%"), models.InboxObject.conversation.is_(None), ), # Keep activities related to the outbox (like Like/Announce/Follow...) or_( - models.InboxObject.activity_object_ap_id.not_like(f"{BASE_URL}/*"), + models.InboxObject.activity_object_ap_id.not_like(f"{BASE_URL}*"), models.InboxObject.activity_object_ap_id.is_(None), ), # Keep direct messages