common api: fetch visibility from normalized object
This commit is contained in:
parent
0522b26883
commit
d6b266163b
|
@ -64,7 +64,10 @@ def get_visibility(%{"in_reply_to_status_id" => status_id}) when not is_nil(stat
|
||||||
"public"
|
"public"
|
||||||
|
|
||||||
inReplyTo ->
|
inReplyTo ->
|
||||||
Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"])
|
# XXX: these heuristics should be moved out of MastodonAPI.
|
||||||
|
with %Object{} = object <- Object.normalize(inReplyTo.data["object"]) do
|
||||||
|
Pleroma.Web.MastodonAPI.StatusView.get_visibility(object.data)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue