Fix AP User invalid url
All checks were successful
/ docker (push) Successful in 4m6s

This commit is contained in:
Melody Becker 2025-04-11 15:02:54 +02:00
parent 7b7a91676e
commit 66297dc78a
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI

View file

@ -142,16 +142,20 @@ func users(w http.ResponseWriter, r *http.Request) {
if user.Icon != nil { if user.Icon != nil {
log.Debug().Msg("icon found") log.Debug().Msg("icon found")
data.Icon = &OutboundMedia{ data.Icon = &OutboundMedia{
Type: "Image", Type: "Image",
Url: webshared.EnsurePublicUrl(user.Icon.Location), Url: config.GlobalConfig.General.GetFullPublicUrl() + webshared.EnsurePublicUrl(
user.Icon.Location,
),
MediaType: user.Icon.Type, MediaType: user.Icon.Type,
} }
} }
if user.Banner != nil { if user.Banner != nil {
log.Debug().Msg("icon banner") log.Debug().Msg("icon banner")
data.Banner = &OutboundMedia{ data.Banner = &OutboundMedia{
Type: "Image", Type: "Image",
Url: webshared.EnsurePublicUrl(user.Banner.Location), Url: config.GlobalConfig.General.GetFullPublicUrl() + webshared.EnsurePublicUrl(
user.Banner.Location,
),
MediaType: user.Banner.Type, MediaType: user.Banner.Type,
} }
} }