Fix query for threads
This commit is contained in:
parent
2fba922e03
commit
3b74ecff29
1 changed files with 2 additions and 1 deletions
|
@ -1601,7 +1601,7 @@ async def get_replies_tree(
|
||||||
select(models.InboxObject)
|
select(models.InboxObject)
|
||||||
.where(
|
.where(
|
||||||
models.InboxObject.ap_context == requested_object.ap_context,
|
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),
|
models.InboxObject.is_deleted.is_(False),
|
||||||
)
|
)
|
||||||
.options(joinedload(models.InboxObject.actor))
|
.options(joinedload(models.InboxObject.actor))
|
||||||
|
@ -1617,6 +1617,7 @@ async def get_replies_tree(
|
||||||
.where(
|
.where(
|
||||||
models.OutboxObject.ap_context == requested_object.ap_context,
|
models.OutboxObject.ap_context == requested_object.ap_context,
|
||||||
models.OutboxObject.is_deleted.is_(False),
|
models.OutboxObject.is_deleted.is_(False),
|
||||||
|
models.OutboxObject.ap_type.in_(["Note", "Page", "Article"]),
|
||||||
)
|
)
|
||||||
.options(
|
.options(
|
||||||
joinedload(
|
joinedload(
|
||||||
|
|
Loading…
Reference in a new issue