nandi/gleanpublic Fork 0
50ea7de
Commits
Clone
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Display AuthorDID when AuthorHandle is missing in annotation card + fix missing resolved handlesUnverified

Julien Robert committed 2026-04-24T09:41:50+02:00 Browse files
50ea7de parent: af6a931
modified internal/server/articles_handler.go +1 -0
@@ -188,6 +188,7 @@ func (s *Server) handleArticleDetail(w http.ResponseWriter, r *http.Request) {
188188 if err != nil {
189189 s.logger.Warn("failed to list annotations", "error", err)
190190 }
191+ resolveAnnotationHandles(ctx, annotations)
191192
192193 feed, err := s.dbs.Articles.GetFeed(ctx, article.FeedURL)
193194 if err != nil {
@@ -188,6 +188,7 @@ func (s *Server) handleArticleDetail(w http.ResponseWriter, r *http.Request) {
188 if err != nil {188 if err != nil {
189 s.logger.Warn("failed to list annotations", "error", err)189 s.logger.Warn("failed to list annotations", "error", err)
190 }190 }
191+ resolveAnnotationHandles(ctx, annotations)
191 192
192 feed, err := s.dbs.Articles.GetFeed(ctx, article.FeedURL)193 feed, err := s.dbs.Articles.GetFeed(ctx, article.FeedURL)
193 if err != nil {194 if err != nil {
modified internal/tmpl/partials/annotation-card.html +1 -1
@@ -24,7 +24,7 @@
2424 {{end}}
2525 <div class="flex items-center justify-between mt-3 pt-3 border-t border-spot-divider">
2626 <div class="flex items-center gap-2 text-xs text-spot-muted">
27- <a href="/profile/{{.annotation.AuthorDID}}" class="hover:text-spot-green transition">{{.annotation.AuthorHandle}}</a>
27+ <a href="/profile/{{.annotation.AuthorDID}}" class="hover:text-spot-green transition">{{if .annotation.AuthorHandle}}{{.annotation.AuthorHandle}}{{else}}{{.annotation.AuthorDID}}{{end}}</a>
2828 {{if .annotation.CreatedAt.Valid}}<span>&middot;</span><span>{{.annotation.CreatedAt.Time.Format "Jan 2, 2006 15:04"}}</span>{{end}}
2929 </div>
3030 {{if eq .annotation.AuthorDID .userDID}}
@@ -24,7 +24,7 @@
24 {{end}}24 {{end}}
25 <div class="flex items-center justify-between mt-3 pt-3 border-t border-spot-divider">25 <div class="flex items-center justify-between mt-3 pt-3 border-t border-spot-divider">
26 <div class="flex items-center gap-2 text-xs text-spot-muted">26 <div class="flex items-center gap-2 text-xs text-spot-muted">
27- <a href="/profile/{{.annotation.AuthorDID}}" class="hover:text-spot-green transition">{{.annotation.AuthorHandle}}</a>27+ <a href="/profile/{{.annotation.AuthorDID}}" class="hover:text-spot-green transition">{{if .annotation.AuthorHandle}}{{.annotation.AuthorHandle}}{{else}}{{.annotation.AuthorDID}}{{end}}</a>
28 {{if .annotation.CreatedAt.Valid}}<span>&middot;</span><span>{{.annotation.CreatedAt.Time.Format "Jan 2, 2006 15:04"}}</span>{{end}}28 {{if .annotation.CreatedAt.Valid}}<span>&middot;</span><span>{{.annotation.CreatedAt.Time.Format "Jan 2, 2006 15:04"}}</span>{{end}}
29 </div>29 </div>
30 {{if eq .annotation.AuthorDID .userDID}}30 {{if eq .annotation.AuthorDID .userDID}}