Skip to content

Commit

Permalink
fix(server/users): properly return content maps for user avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Aug 27, 2024
1 parent 3876ad2 commit 6c60c1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/entity/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}
}
Expand All @@ -134,6 +135,7 @@ func userBiography(u *ent.User) versiautils.TextContentTypeMap {
return versiautils.TextContentTypeMap{
"text/html": versiautils.TextContent{
Content: *u.Biography,
Remote: false,
},
}
}
Expand All @@ -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,
},
}
}

0 comments on commit 6c60c1e

Please sign in to comment.