aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-09-19 04:57:28 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-09-19 04:59:25 +0000
commit0cac493fdc783d717fca3486099aa18a698139fd (patch)
treeae119288a6023420892a11e4bedc013f0342c9d7
parent47c9b972b9ef5133f588fdcdc4eeda00888d269e (diff)
downloadpleroma-0cac493fdc783d717fca3486099aa18a698139fd.tar.gz
mastodon api: default attachment type to image if one is not present
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 8f6c4b062..284df837a 100644
--- 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 =