Fix mentions

This commit is contained in:
r 2019-12-14 17:47:14 +00:00
parent da44fafe92
commit 8236f08c18

View file

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