[bug] Replies whose parent can’t be fetched aren’t treated as replies in REST API #715
Labels
No Label
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#715
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
From source
Extra details
Alpine 3.19
Version
3.11 (issue exists for longer)
PostgreSQL version
16
What were you trying to do?
When Akkoma receives a reply notice but can’t load the parent post, all relevant
in_reply_*
fields in the REST API will benull
making frontends and apps think this is a top-level post. However, at least for the samples I have here, in the database it is still referencing the AP ID of the parent post, so Akkoma knows this is a reply.This can happen e.g. due to MRF rejecting the parent, temporary remote downtime or the thread being follower-only and nobody on the local instance follows the parent poster making remote refuse our request.
I guess since it can’t fetch the parent, it’s unable to find a matching activity in the DB and thus can’t fill out the fields with valid ID.
What did you expect to happen?
Replies remain identifyable as replies; e.g. by pointing
in_reply_to_id
,in_reply_to_account_id
andpleroma.in_reply_to_account_acct
to a placeholder post and user nobody has perms to fetch.What actually happened?
Frontend treats them as top-level posts
Logs
No response
Severity
I can manage
Have you searched for this issue?
We concluded on IRC that e.g.
#
or_
would be a good placeholder IDs to use for unavailable users and posts, since afaiu:Flake
(CompatType
) decoding will returnnil
instead of raising an exception#
: it will terminate URLs so trying to resolve it will never lead to an actual lookup on the server (undecided if good or bad)