From c9585ec00760b46f013f36a7f7625ac36471d3e8 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 19 Sep 2018 04:58:17 +0000 Subject: [PATCH] twitter api: fix mimetype fallback when attachments use a URI instead of a URL object --- lib/pleroma/web/twitter_api/representers/object_representer.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/web/twitter_api/representers/object_representer.ex b/lib/pleroma/web/twitter_api/representers/object_representer.ex index 6aa794a59..d5291a397 100644 --- a/lib/pleroma/web/twitter_api/representers/object_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/object_representer.ex @@ -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"] -- 2.45.2