Fix mentions

master
r 3 years ago
parent da44fafe92
commit 8236f08c18
  1. 15
      service/service.go

@ -246,16 +246,23 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma
return
}
u, err := c.GetAccountCurrentUser(ctx)
if err != nil {
return
}
var content string
if reply {
content += status.Account.Acct + " "
if u.ID != status.Account.ID {
content += "@" + status.Account.Acct + " "
}
for _, m := range status.Mentions {
content += m.Acct + " "
if u.ID != m.ID {
content += "@" + m.Acct + " "
}
}
}
fmt.Println("content", content)
data := renderer.NewThreadPageTemplateData(status, context, reply, id, content)
err = svc.renderer.RenderThreadPage(ctx, client, data)
if err != nil {

Loading…
Cancel
Save