Enable mediaproxy by default
authorFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 8 Jun 2022 16:19:42 +0000 (17:19 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 8 Jun 2022 16:19:42 +0000 (17:19 +0100)
lib/pleroma/web/mastodon_api/views/status_view.ex
lib/pleroma/web/pleroma_api/views/emoji_reaction_view.ex

index e4057f108850c27bbaa6dd9378685c5250c0f238..90f6f8469a75a918eed4ce426f0b3471f6ee5f5e 100644 (file)
@@ -572,7 +572,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
     %{
       name: emoji,
       count: length(users),
-      url: url,
+      url: MediaProxy.url(url),
       me: !!(current_user && current_user.ap_id in users)
     }
   end
index 3575f50da48770ba4994b6aac6087f84f903a54f..85eb09d25aed39231f057a6b5ccb7f31e2122c72 100644 (file)
@@ -6,6 +6,7 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionView do
   use Pleroma.Web, :view
 
   alias Pleroma.Web.MastodonAPI.AccountView
+  alias Pleroma.Web.MediaProxy
 
   def render("index.json", %{emoji_reactions: emoji_reactions} = opts) do
     render_many(emoji_reactions, __MODULE__, "show.json", opts)
@@ -17,7 +18,7 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionView do
       name: emoji,
       count: length(users),
       accounts: render(AccountView, "index.json", users: users, for: user),
-      url: url,
+      url: MediaProxy.url(url),
       me: !!(user && user.ap_id in user_ap_ids)
     }
   end