aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-13 20:33:20 +0000
committerr <r@freesoftwareextremist.com>2019-12-13 20:33:20 +0000
commit2495d3389e0489e4d69f9162c989ae10e92b6e6e (patch)
tree32b3b8423f767cf45dc2a1ea22f7bce7a4e0e64c /service
parent9ba666009bc5c67f7c09103393e4142f6739c78d (diff)
downloadbloat-2495d3389e0489e4d69f9162c989ae10e92b6e6e.tar.gz
bloat-2495d3389e0489e4d69f9162c989ae10e92b6e6e.zip
Use account mentions as default text in replies
Diffstat (limited to 'service')
-rw-r--r--service/service.go12
1 files changed, 11 insertions, 1 deletions
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