Skip to content
Snippets Groups Projects
Commit c9585ec0 authored by kaniini's avatar kaniini
Browse files

twitter api: fix mimetype fallback when attachments use a URI instead of a URL object

parent 0cac493f
No related branches found
No related tags found
No related merge requests found
......@@ -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"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment