all repos — honk @ d4e657a181d53050ee79211ea390555a81627a8b

my fork of honk

need to demasto the mention
Ted Unangst tedu@tedunangst.com
Mon, 31 Jul 2023 20:46:43 -0400
commit

d4e657a181d53050ee79211ea390555a81627a8b

parent

61bab8268faebd6b0345cd190778933e16f709a3

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M fun.gofun.go

@@ -178,9 +178,10 @@ io.WriteString(w, data)

} if user != nil { htf.RetargetLink = func(href string) string { + h2 := strings.ReplaceAll(href, "/@", "/users/") for _, m := range h.Mentions { - if href == m.Where { - return "/h?xid=" + url.QueryEscape(href) + if h2 == m.Where || href == m.Where { + return "/h?xid=" + url.QueryEscape(m.Where) } } return href