From 66297dc78afc022624425a610499c188b13a23f8 Mon Sep 17 00:00:00 2001 From: mstar Date: Fri, 11 Apr 2025 15:02:54 +0200 Subject: [PATCH] Fix AP User invalid url --- web/public/api/activitypub/user.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/public/api/activitypub/user.go b/web/public/api/activitypub/user.go index 5413233..f663919 100644 --- a/web/public/api/activitypub/user.go +++ b/web/public/api/activitypub/user.go @@ -142,16 +142,20 @@ func users(w http.ResponseWriter, r *http.Request) { if user.Icon != nil { log.Debug().Msg("icon found") data.Icon = &OutboundMedia{ - Type: "Image", - Url: webshared.EnsurePublicUrl(user.Icon.Location), + Type: "Image", + Url: config.GlobalConfig.General.GetFullPublicUrl() + webshared.EnsurePublicUrl( + user.Icon.Location, + ), MediaType: user.Icon.Type, } } if user.Banner != nil { log.Debug().Msg("icon banner") data.Banner = &OutboundMedia{ - Type: "Image", - Url: webshared.EnsurePublicUrl(user.Banner.Location), + Type: "Image", + Url: config.GlobalConfig.General.GetFullPublicUrl() + webshared.EnsurePublicUrl( + user.Banner.Location, + ), MediaType: user.Banner.Type, } }