mirror of
https://git.freesoftwareextremist.com/bloat
synced 2024-11-12 17:44:10 +00:00
Fix mentions
This commit is contained in:
parent
da44fafe92
commit
8236f08c18
1 changed files with 14 additions and 7 deletions
|
@ -246,15 +246,22 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma
|
|||
return
|
||||
}
|
||||
|
||||
var content string
|
||||
if reply {
|
||||
content += status.Account.Acct + " "
|
||||
for _, m := range status.Mentions {
|
||||
content += m.Acct + " "
|
||||
}
|
||||
u, err := c.GetAccountCurrentUser(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
err = svc.renderer.RenderThreadPage(ctx, client, data)
|
||||
|
|
Loading…
Reference in a new issue