Use username as title for mentions

This commit is contained in:
r 2020-10-30 16:07:11 +00:00
parent f4e85c571a
commit 237182c171

View file

@ -61,7 +61,7 @@ func statusContentFilter(spoiler string, content string,
replacements = append(replacements, ":"+e.ShortCode+":", r) replacements = append(replacements, ":"+e.ShortCode+":", r)
} }
for _, m := range mentions { for _, m := range mentions {
replacements = append(replacements, "\""+m.URL+"\"", "\"/user/"+m.ID+"\"") replacements = append(replacements, `"`+m.URL+`"`, `"/user/`+m.ID+`" title="@`+m.Acct+`"`)
} }
return strings.NewReplacer(replacements...).Replace(content) return strings.NewReplacer(replacements...).Replace(content)
} }