mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 08:16:16 +00:00
common api: handle replying to orphaned threads
This commit is contained in:
parent
3448b434f5
commit
741c6ad671
|
@ -61,9 +61,14 @@ defmodule Pleroma.Web.CommonAPI do
|
||||||
do: visibility
|
do: visibility
|
||||||
|
|
||||||
def get_visibility(%{"in_reply_to_status_id" => status_id}) when not is_nil(status_id) do
|
def get_visibility(%{"in_reply_to_status_id" => status_id}) when not is_nil(status_id) do
|
||||||
inReplyTo = get_replied_to_activity(status_id)
|
case get_replied_to_activity(status_id) do
|
||||||
|
nil ->
|
||||||
|
"public"
|
||||||
|
|
||||||
|
inReplyTo ->
|
||||||
Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"])
|
Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def get_visibility(_), do: "public"
|
def get_visibility(_), do: "public"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue