More fixes (from the test instance)
This commit is contained in:
parent
e6066cb212
commit
1f6d6c5477
3 changed files with 6 additions and 3 deletions
|
@ -211,7 +211,9 @@ async def admin_inbox(
|
||||||
(
|
(
|
||||||
await db_session.scalars(
|
await db_session.scalars(
|
||||||
q.options(
|
q.options(
|
||||||
joinedload(models.InboxObject.relates_to_inbox_object),
|
joinedload(models.InboxObject.relates_to_inbox_object).options(
|
||||||
|
joinedload(models.InboxObject.actor)
|
||||||
|
),
|
||||||
joinedload(models.InboxObject.relates_to_outbox_object).options(
|
joinedload(models.InboxObject.relates_to_outbox_object).options(
|
||||||
joinedload(
|
joinedload(
|
||||||
models.OutboxObject.outbox_object_attachments
|
models.OutboxObject.outbox_object_attachments
|
||||||
|
|
|
@ -886,6 +886,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"]),
|
||||||
)
|
)
|
||||||
.options(joinedload(models.InboxObject.actor))
|
.options(joinedload(models.InboxObject.actor))
|
||||||
)
|
)
|
||||||
|
@ -917,7 +918,7 @@ async def get_replies_tree(
|
||||||
logger.info(nodes_by_in_reply_to)
|
logger.info(nodes_by_in_reply_to)
|
||||||
|
|
||||||
if len(nodes_by_in_reply_to.get(None, [])) > 1:
|
if len(nodes_by_in_reply_to.get(None, [])) > 1:
|
||||||
raise ValueError("Invalid replies tree")
|
raise ValueError(f"Invalid replies tree: {[n.ap_object for n in tree_nodes]}")
|
||||||
|
|
||||||
def _get_reply_node_children(
|
def _get_reply_node_children(
|
||||||
node: ReplyTreeNode,
|
node: ReplyTreeNode,
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
{% for inbox_object in inbox %}
|
{% for inbox_object in inbox %}
|
||||||
{% if inbox_object.ap_type == "Announce" %}
|
{% if inbox_object.ap_type == "Announce" %}
|
||||||
{{ actor_action(inbox_object, "shared one of your post") }}
|
{{ actor_action(inbox_object, "shared") }}
|
||||||
{{ utils.display_object(inbox_object.relates_to_anybox_object) }}
|
{{ utils.display_object(inbox_object.relates_to_anybox_object) }}
|
||||||
{% elif inbox_object.ap_type in ["Article", "Note", "Video"] %}
|
{% elif inbox_object.ap_type in ["Article", "Note", "Video"] %}
|
||||||
{{ utils.display_object(inbox_object) }}
|
{{ utils.display_object(inbox_object) }}
|
||||||
|
|
Loading…
Reference in a new issue