media proxy: good enough wip

This commit is contained in:
href 2017-11-22 19:06:07 +01:00
commit 5f35fdcf5d
No known key found for this signature in database
GPG key ID: EE8296C1A152C325
7 changed files with 101 additions and 8 deletions

View file

@ -6,7 +6,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter do
data = object.data
url = List.first(data["url"])
%{
url: url["href"],
url: url["href"] |> Pleroma.Web.MediaProxy.url(),
mimetype: url["mediaType"],
id: data["uuid"],
oembed: false