mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-23 17:54:22 +00:00
Merge branch 'bugfix/common-api-visibility-orphan' into 'develop'
common api: properly handle replying to orphaned threads See merge request pleroma/pleroma!299
This commit is contained in:
commit
1ad5cbed51
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue