need to demasto the mention

This commit is contained in:
Ted Unangst 2023-07-31 20:46:43 -04:00
parent 6cc464910d
commit 592c189e8b
1 changed files with 3 additions and 2 deletions

5
fun.go
View File

@ -178,9 +178,10 @@ func reverbolate(userid int64, honks []*Honk) {
} }
if user != nil { if user != nil {
htf.RetargetLink = func(href string) string { htf.RetargetLink = func(href string) string {
h2 := strings.ReplaceAll(href, "/@", "/users/")
for _, m := range h.Mentions { for _, m := range h.Mentions {
if href == m.Where { if h2 == m.Where || href == m.Where {
return "/h?xid=" + url.QueryEscape(href) return "/h?xid=" + url.QueryEscape(m.Where)
} }
} }
return href return href