From 2495d3389e0489e4d69f9162c989ae10e92b6e6e Mon Sep 17 00:00:00 2001 From: r Date: Fri, 13 Dec 2019 20:33:20 +0000 Subject: Use account mentions as default text in replies --- service/service.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'service') diff --git a/service/service.go b/service/service.go index 7088a9b..8b5562d 100644 --- a/service/service.go +++ b/service/service.go @@ -246,7 +246,17 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma return } - data := renderer.NewThreadPageTemplateData(status, context, reply, id) + var content string + if reply { + content += status.Account.Acct + " " + for _, m := range status.Mentions { + 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 { return -- cgit v1.2.3