From 6e7150699a4a5ea6ae875f0fd20385654e1b396e Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 15 Sep 2019 22:16:53 +0200 Subject: [PATCH] Fix GC --- core/gc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/gc.py b/core/gc.py index 1d2229c..aeee1c4 100644 --- a/core/gc.py +++ b/core/gc.py @@ -163,9 +163,11 @@ def perform() -> None: # noqa: C901 continue obj = ap.parse_activity(data["activity"]) + # This activity is a direct reply of one the server actor activity, keep it + in_reply_to = obj.get_in_reply_to() # This activity is part of a thread we want to keep, keep it - if obj and in_reply_to and meta.get("thread_root_parent"): + if in_reply_to and meta.get("thread_root_parent"): thread_root_parent = meta["thread_root_parent"] if thread_root_parent.startswith(ID) or thread_root_parent in toi: _keep(data)