From 3b74ecff29c4ab278f28f0affb1a0ee565534675 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 31 Jul 2022 15:11:08 +0200 Subject: [PATCH] Fix query for threads --- app/boxes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/boxes.py b/app/boxes.py index 9169ef9..c590bf0 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -1601,7 +1601,7 @@ async def get_replies_tree( select(models.InboxObject) .where( models.InboxObject.ap_context == requested_object.ap_context, - models.InboxObject.ap_type.not_in(["Announce"]), + models.InboxObject.ap_type.in_(["Note", "Page", "Article"]), models.InboxObject.is_deleted.is_(False), ) .options(joinedload(models.InboxObject.actor)) @@ -1617,6 +1617,7 @@ async def get_replies_tree( .where( models.OutboxObject.ap_context == requested_object.ap_context, models.OutboxObject.is_deleted.is_(False), + models.OutboxObject.ap_type.in_(["Note", "Page", "Article"]), ) .options( joinedload(