common api: fetch visibility from normalized object

This commit is contained in:
William Pitcock 2018-11-25 18:57:38 +00:00
parent 0522b26883
commit d6b266163b

View file

@ -64,7 +64,10 @@ defmodule Pleroma.Web.CommonAPI do
"public"
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