Use username as title for mentions
authorr <r@freesoftwareextremist.com>
Fri, 30 Oct 2020 16:07:11 +0000 (16:07 +0000)
committerr <r@freesoftwareextremist.com>
Fri, 30 Oct 2020 16:07:56 +0000 (16:07 +0000)
renderer/renderer.go

index f90e8dcfee47a7bd46e7a4c4976fe6200f9fb316..3d4685f38c2a619b2191a0a70dec9c7c6ae51258 100644 (file)
@@ -61,7 +61,7 @@ func statusContentFilter(spoiler string, content string,
                replacements = append(replacements, ":"+e.ShortCode+":", r)
        }
        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)
 }