Commit e8389694 authored by kaniini's avatar kaniini

Merge branch 'use-media-proxy-in-suggestions-api' into 'develop'

use media proxy for the suggestions api

See merge request pleroma/pleroma!305
parents 65e8d47c 6cbfb5ab
......@@ -7,6 +7,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.OAuth.{Authorization, Token, App}
alias Pleroma.Web.MediaProxy
alias Comeonin.Pbkdf2
import Ecto.Query
require Logger
......@@ -1130,6 +1131,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
)
end)
|> Enum.map(fn x ->
Map.put(x, "avatar", MediaProxy.url(x["avatar"]))
end)
|> Enum.map(fn x ->
Map.put(x, "avatar_static", MediaProxy.url(x["avatar_static"]))
end)
conn
|> json(data2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment