Commit d6b26616 authored by kaniini's avatar kaniini

common api: fetch visibility from normalized object

parent 0522b268
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment