[Pleroma.Web.MastodonAPI.StatusView]: Return nil as fallback for missing views
This commit is contained in:
parent
a8137159c2
commit
3b0e9287a5
@ -158,6 +158,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def render("status.json", %{activity: %{data: %{"object" => object}} = activity} = opts) do
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
def render("attachment.json", %{attachment: attachment}) do
|
def render("attachment.json", %{attachment: attachment}) do
|
||||||
[attachment_url | _] = attachment["url"]
|
[attachment_url | _] = attachment["url"]
|
||||||
media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"
|
media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"
|
||||||
|
Loading…
Reference in New Issue
Block a user