commit: 0cac493fdc783d717fca3486099aa18a698139fd
parent: 47c9b972b9ef5133f588fdcdc4eeda00888d269e
Author: William Pitcock <nenolod@dereferenced.org>
Date: Wed, 19 Sep 2018 04:57:28 +0000
mastodon api: default attachment type to image if one is not present
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -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 =