diff options
author | 2024-10-21 14:04:50 +0200 | |
---|---|---|
committer | 2024-10-21 14:04:50 +0200 | |
commit | 8a93300ac43ffd70ca687d71ee8eefdb755e6a58 (patch) | |
tree | 4f091a3e8ad082738f65f5ab47a1be910bc94933 /internal/typeutils/internaltofrontend.go | |
parent | [chore]: Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5 (#3469) (diff) | |
download | gotosocial-8a93300ac43ffd70ca687d71ee8eefdb755e6a58.tar.xz |
[feature] Add image descriptions for default avatar + header; don't allow editing default desc (#3473)v0.17.1
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r-- | internal/typeutils/internaltofrontend.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 1e20455c3..11bc73dc3 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -270,21 +270,25 @@ func (c *Converter) accountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A // - Emojis var ( + aviID string aviURL string aviURLStatic string aviDesc string + headerID string headerURL string headerURLStatic string headerDesc string ) if a.AvatarMediaAttachment != nil { + aviID = a.AvatarMediaAttachmentID aviURL = a.AvatarMediaAttachment.URL aviURLStatic = a.AvatarMediaAttachment.Thumbnail.URL aviDesc = a.AvatarMediaAttachment.Description } if a.HeaderMediaAttachment != nil { + headerID = a.HeaderMediaAttachmentID headerURL = a.HeaderMediaAttachment.URL headerURLStatic = a.HeaderMediaAttachment.Thumbnail.URL headerDesc = a.HeaderMediaAttachment.Description @@ -367,9 +371,11 @@ func (c *Converter) accountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A Avatar: aviURL, AvatarStatic: aviURLStatic, AvatarDescription: aviDesc, + AvatarMediaID: aviID, Header: headerURL, HeaderStatic: headerURLStatic, HeaderDescription: headerDesc, + HeaderMediaID: headerID, FollowersCount: followersCount, FollowingCount: followingCount, StatusesCount: statusesCount, |