diff options
author | kaniini <nenolod@gmail.com> | 2018-08-30 23:06:30 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2018-08-30 23:06:30 +0000 |
commit | e838969495d2ca95406920ceef98d08f01d71192 (patch) | |
tree | c67fa205796d277b4473e7fb040dc625f623dfa8 /lib | |
parent | 65e8d47cfb74e76bf966a0340fd5ced184c74fec (diff) | |
parent | 6cbfb5ab5d6eacf2459f137c0b71a9a285c0b576 (diff) | |
download | pleroma-e838969495d2ca95406920ceef98d08f01d71192.tar.gz |
Merge branch 'use-media-proxy-in-suggestions-api' into 'develop'
use media proxy for the suggestions api
See merge request pleroma/pleroma!305
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index c90f9fa05..bd6f04c55 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -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) |