Use account mentions as default text in replies
[bloat] / renderer / model.go
1 package renderer
2
3 import (
4         "mastodon"
5 )
6
7 type TimelinePageTemplateData struct {
8         Statuses []*mastodon.Status
9         HasNext  bool
10         NextLink string
11         HasPrev  bool
12         PrevLink string
13 }
14
15 func NewTimelinePageTemplateData(statuses []*mastodon.Status, hasNext bool, nextLink string, hasPrev bool,
16         prevLink string) *TimelinePageTemplateData {
17         return &TimelinePageTemplateData{
18                 Statuses: statuses,
19                 HasNext:  hasNext,
20                 NextLink: nextLink,
21                 HasPrev:  hasPrev,
22                 PrevLink: prevLink,
23         }
24 }
25
26 type ThreadPageTemplateData struct {
27         Status       *mastodon.Status
28         Context      *mastodon.Context
29         PostReply    bool
30         ReplyToID    string
31         ReplyContent string
32 }
33
34 func NewThreadPageTemplateData(status *mastodon.Status, context *mastodon.Context, postReply bool, replyToID string, replyContent string) *ThreadPageTemplateData {
35         return &ThreadPageTemplateData{
36                 Status:       status,
37                 Context:      context,
38                 PostReply:    postReply,
39                 ReplyToID:    replyToID,
40                 ReplyContent: replyContent,
41         }
42 }