mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-28 19:20:20 +00:00
mastodon api: default attachment type to image if one is not present
This commit is contained in:
parent
47c9b972b9
commit
0cac493fdc
|
@ -154,7 +154,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
|
||||
def render("attachment.json", %{attachment: attachment}) do
|
||||
[attachment_url | _] = attachment["url"]
|
||||
media_type = attachment_url["mediaType"] || attachment_url["mimeType"]
|
||||
media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"
|
||||
href = attachment_url["href"]
|
||||
|
||||
type =
|
||||
|
|
Loading…
Reference in a new issue