forked from AkkomaGang/akkoma
[Pleroma.Web.MastodonAPI.StatusView]: Return nil as fallback for missing views
This commit is contained in:
parent
a8137159c2
commit
3b0e9287a5
1 changed files with 4 additions and 0 deletions
|
@ -158,6 +158,10 @@ def render("status.json", %{activity: %{data: %{"object" => object}} = activity}
|
||||||
}
|
}
|
||||||
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 a new issue