From 6c60c1e8ed05e27ebb1748b21ae1f2c79c94a621 Mon Sep 17 00:00:00 2001 From: DevMiner Date: Wed, 28 Aug 2024 01:22:42 +0200 Subject: [PATCH] fix(server/users): properly return content maps for user avatars --- internal/entity/user.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/entity/user.go b/internal/entity/user.go index e1651ae..197dc64 100644 --- a/internal/entity/user.go +++ b/internal/entity/user.go @@ -120,6 +120,7 @@ func userAvatar(u *ent.User) versiautils.ImageContentMap { return versiautils.ImageContentMap{ "image/svg+xml": versiautils.File{ Content: utils.DefaultAvatarURL(u.ID), + Remote: true, }, } } @@ -134,6 +135,7 @@ func userBiography(u *ent.User) versiautils.TextContentTypeMap { return versiautils.TextContentTypeMap{ "text/html": versiautils.TextContent{ Content: *u.Biography, + Remote: false, }, } } @@ -150,7 +152,8 @@ func imageMap(i *ent.Image) versiautils.ImageContentMap { return versiautils.ImageContentMap{ i.MimeType: { - Content: (*versiautils.URL)(u), + Content: versiautils.URLFromStd(u), + Remote: true, }, } }