need to demasto the mention
Ted Unangst tedu@tedunangst.com
Mon, 31 Jul 2023 20:46:43 -0400
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
fun.go
→
fun.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