mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
twitter api: fix mimetype fallback when attachments use a URI instead of a URL object
This commit is contained in:
parent
0cac493fdc
commit
c9585ec007
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter do
|
|||
def to_map(%Object{data: %{"url" => url} = data}, _opts) when is_binary(url) do
|
||||
%{
|
||||
url: url |> Pleroma.Web.MediaProxy.url(),
|
||||
mimetype: data["mediaType"] || url["mimeType"],
|
||||
mimetype: data["mediaType"] || data["mimeType"],
|
||||
id: data["uuid"],
|
||||
oembed: false,
|
||||
description: data["name"]
|
||||
|
|
Loading…
Reference in a new issue