瀏覽代碼

mastodon api: default attachment type to image if one is not present

tags/v0.9.9
William Pitcock 5 年之前
父節點
當前提交
0cac493fdc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      lib/pleroma/web/mastodon_api/views/status_view.ex

+ 1
- 1
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 =


Loading…
取消
儲存