From: William Pitcock Date: Wed, 19 Sep 2018 04:58:17 +0000 (+0000) Subject: twitter api: fix mimetype fallback when attachments use a URI instead of a URL object X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c9585ec00760b46f013f36a7f7625ac36471d3e8;p=akkoma twitter api: fix mimetype fallback when attachments use a URI instead of a URL object --- 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"]