diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/service.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/service/service.go b/service/service.go index 4d74449..db7a1d7 100644 --- a/service/service.go +++ b/service/service.go @@ -276,10 +276,9 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma return } - var content string - var replyToID string + var replyContext *model.ReplyContext if reply { - replyToID = id + var content string if u.ID != status.Account.ID { content += "@" + status.Account.Acct + " " } @@ -288,6 +287,11 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma content += "@" + status.Mentions[i].Acct + " " } } + replyContext = &model.ReplyContext{ + InReplyToID: id, + InReplyToName: status.Account.Acct, + ReplyContent: content, + } } context, err := c.GetStatusContext(ctx, id) @@ -310,7 +314,7 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma return } - data := renderer.NewThreadPageTemplateData(statuses, replyToID, content, replyMap, navbarData) + data := renderer.NewThreadPageTemplateData(statuses, replyContext, replyMap, navbarData) err = svc.renderer.RenderThreadPage(ctx, client, data) if err != nil { return |