From 49f5bfbcb8ff3474f7da56856eb3b566945dca52 Mon Sep 17 00:00:00 2001 From: rachel-mp4 Date: Wed, 26 Nov 2025 23:45:53 -0500 Subject: [PATCH] maybe i shouldn't make alt text be a mandatory thing in the lexicon --- server/internal/db/db.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/server/internal/db/db.go b/server/internal/db/db.go index aab56d4..3162a27 100644 --- a/server/internal/db/db.go +++ b/server/internal/db/db.go @@ -208,8 +208,9 @@ func (s *Store) evalGetItems(query string, ctx context.Context, limit int, param var t string var p types.ProfileView var uri string - var body string + var body *string var image types.Image + var alt *string var nick string var color uint32 var s types.SignetView @@ -228,7 +229,7 @@ func (s *Store) evalGetItems(query string, ctx context.Context, limit int, param &body, &image.BlobCID, &image.BlobMIME, - &image.Alt, + &alt, &image.Height, &image.Width, @@ -249,7 +250,10 @@ func (s *Store) evalGetItems(query string, ctx context.Context, limit int, param } if t == "message" { var msg types.SignedMessageView - msg.Body = body + if body != nil { + + msg.Body = *body + } if nick != "" { msg.Nick = &nick } @@ -271,7 +275,9 @@ func (s *Store) evalGetItems(query string, ctx context.Context, limit int, param aspect.Height = *image.Height imgview.AspectRatio = &aspect } - imgview.Alt = image.Alt + if alt != nil { + imgview.Alt = *alt + } base := os.Getenv("MY_IDENTITY") src := fmt.Sprintf("https://%s/xrpc/org.xcvr.lrc.getImage?uri=%s", base, uri) imgview.Src = &src -- 2.51.2