summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/status.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-02-08 12:17:18 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-02-08 12:17:18 +0100
commit4c294a596a9e0524f89b80e1608c3411f4fcf679 (patch)
tree23851533a5f1adb5442fd7c3c034578c34cd3f0d /internal/gtsmodel/status.go
parentupdate outdated comment (diff)
parent[chore] Drone config update (#383) (diff)
downloadgotosocial-4c294a596a9e0524f89b80e1608c3411f4fcf679.tar.xz
Merge branch 'main' into media_refactor
Diffstat (limited to 'internal/gtsmodel/status.go')
-rw-r--r--internal/gtsmodel/status.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/gtsmodel/status.go b/internal/gtsmodel/status.go
index e80924ca3..e798ea41b 100644
--- a/internal/gtsmodel/status.go
+++ b/internal/gtsmodel/status.go
@@ -66,6 +66,27 @@ type Status struct {
Likeable bool `validate:"-" bun:",notnull"` // This status can be liked/faved
}
+/*
+ The below functions are added onto the gtsmodel status so that it satisfies
+ the Timelineable interface in internal/timeline.
+*/
+
+func (s *Status) GetID() string {
+ return s.ID
+}
+
+func (s *Status) GetAccountID() string {
+ return s.AccountID
+}
+
+func (s *Status) GetBoostOfID() string {
+ return s.BoostOfID
+}
+
+func (s *Status) GetBoostOfAccountID() string {
+ return s.BoostOfAccountID
+}
+
// StatusToTag is an intermediate struct to facilitate the many2many relationship between a status and one or more tags.
type StatusToTag struct {
StatusID string `validate:"ulid,required" bun:"type:CHAR(26),unique:statustag,nullzero,notnull"`