From 476f817464a4afb988d4cb79b7f739a1dc9458ef Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 12 Nov 2023 16:31:20 -0700 Subject: [PATCH] Only consider local replies --- activities/management/commands/pruneposts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/activities/management/commands/pruneposts.py b/activities/management/commands/pruneposts.py index 8e0489f..ecef453 100644 --- a/activities/management/commands/pruneposts.py +++ b/activities/management/commands/pruneposts.py @@ -32,9 +32,10 @@ class Command(BaseCommand): print(f" found {len(post_ids_and_uris)}") # Fetch all of their replies and exclude any that have local replies - print("Excluding ones with replies...") + print("Excluding ones with local replies...") replies = Post.objects.filter( - in_reply_to__in=post_ids_and_uris.keys() + local=True, + in_reply_to__in=post_ids_and_uris.keys(), ).values_list("in_reply_to", flat=True) for reply in replies: if reply and reply in post_ids_and_uris: