MastoAPI/CommonAPI: Return 404 when post not visible to user

Akkoma patches returned 403 and some of my previous commits returned 422.
This unifies the errors returned to 404 "Record not found", gaslighting
user just like we do for other endpoints and how Mastodon does it.
This commit is contained in:
Phantasm 2025-12-10 14:31:22 +01:00
commit 293628fb24
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8
5 changed files with 66 additions and 50 deletions

View file

@ -154,7 +154,7 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do
add_error(draft, dgettext("errors", "Cannot reply to a deleted status"))
false ->
add_error(draft, dgettext("errors", "Replying to a status that is not visibile to user"))
add_error(draft, dgettext("errors", "Record not found"))
{:type, type} ->
add_error(