diff --git a/appview/pages/funcmap.go b/appview/pages/funcmap.go index 9bce3fa6..5340ca5a 100644 --- a/appview/pages/funcmap.go +++ b/appview/pages/funcmap.go @@ -23,6 +23,7 @@ import ( chromahtml "github.com/alecthomas/chroma/v2/formatters/html" "github.com/alecthomas/chroma/v2/lexers" "github.com/alecthomas/chroma/v2/styles" + "github.com/bluesky-social/indigo/atproto/syntax" "github.com/dustin/go-humanize" "github.com/dustin/go-humanize/english" "github.com/go-enry/go-enry/v2" @@ -504,6 +505,10 @@ func (p *Pages) funcMap() template.FuncMap { "PdsUserDomain": p.pdsCfg.UserDomain, } }, + "did": func(s string) syntax.DID { + // cast to DID + return syntax.DID(s) + }, } } diff --git a/appview/pages/templates/repo/issues/fragments/commentList.html b/appview/pages/templates/repo/issues/fragments/commentList.html index 39492331..6a09db8a 100644 --- a/appview/pages/templates/repo/issues/fragments/commentList.html +++ b/appview/pages/templates/repo/issues/fragments/commentList.html @@ -15,7 +15,7 @@ "LoggedInUser" $root.LoggedInUser "Issue" $root.Issue "Comment" $comment.Self - "VouchRelationship" (index $root.VouchRelationships $comment.Self.Did) + "VouchRelationship" (index $root.VouchRelationships (did $comment.Self.Did)) ) }}