Skip to content
Snippets Groups Projects
Commit 741c6ad6 authored by kaniini's avatar kaniini
Browse files

common api: handle replying to orphaned threads

parent 3448b434
No related branches found
No related tags found
No related merge requests found
......@@ -61,8 +61,13 @@ defmodule Pleroma.Web.CommonAPI do
do: visibility
def get_visibility(%{"in_reply_to_status_id" => status_id}) when not is_nil(status_id) do
inReplyTo = get_replied_to_activity(status_id)
Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"])
case get_replied_to_activity(status_id) do
nil ->
"public"
inReplyTo ->
Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"])
end
end
def get_visibility(_), do: "public"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment