diff options
author | r <r@freesoftwareextremist.com> | 2019-12-14 17:47:14 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2019-12-14 17:47:14 +0000 |
commit | 8236f08c187aa99fac7f6b5e64efa8a11ba9b45c (patch) | |
tree | 4b7aefbaa6b9d843b88c04762f19306fa5a4fe14 | |
parent | da44fafe92707e6980abefcfb08c80a1eb9a862a (diff) | |
download | bloat-8236f08c187aa99fac7f6b5e64efa8a11ba9b45c.tar.gz bloat-8236f08c187aa99fac7f6b5e64efa8a11ba9b45c.zip |
Fix mentions
-rw-r--r-- | service/service.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/service/service.go b/service/service.go index 8b5562d..b10a5de 100644 --- a/service/service.go +++ b/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 { |