From: William Pitcock Date: Wed, 19 Sep 2018 04:57:28 +0000 (+0000) Subject: mastodon api: default attachment type to image if one is not present X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=0cac493fdc783d717fca3486099aa18a698139fd;p=akkoma mastodon api: default attachment type to image if one is not present --- 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 =