logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: 546c03b2c6eb56aa35f583a9ad103679171f3b2c
parent 1efe48672d9daf57093f4ae7facba5790c3c1920
Author: nicole mikołajczyk <git@mkljczk.pl>
Date:   Fri, 19 Sep 2025 16:27:34 +0200

`remote_url` links to unproxied URL

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>

Diffstat:

Achangelog.d/remote-url.fix1+
Mlib/pleroma/web/mastodon_api/views/status_view.ex5+++--
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/changelog.d/remote-url.fix b/changelog.d/remote-url.fix @@ -0,0 +1 @@ +`remote_url` links to unproxied URL diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -602,7 +602,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do def render("attachment.json", %{attachment: attachment}) do [attachment_url | _] = attachment["url"] media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image" - href = attachment_url["href"] |> MediaProxy.url() + href_remote = attachment_url["href"] + href = href_remote |> MediaProxy.url() href_preview = attachment_url["href"] |> MediaProxy.preview_url() meta = render("attachment_meta.json", %{attachment: attachment}) @@ -641,7 +642,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do %{ id: attachment_id, url: href, - remote_url: href, + remote_url: href_remote, preview_url: href_preview, text_url: href, type: type,