summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/status.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-02-09 15:24:49 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-09 14:24:49 +0000
commite890169e6f151f668580398685c2dbf3c4b780ff (patch)
tree3d3be4348eee2c71288c93772cfcaa128aabd71b /internal/gtsmodel/status.go
parent[chore] Move `DoOnce` func wrapper to util (#2613) (diff)
downloadgotosocial-e890169e6f151f668580398685c2dbf3c4b780ff.tar.xz
use pointer for freshness window (#2614)
Diffstat (limited to 'internal/gtsmodel/status.go')
-rw-r--r--internal/gtsmodel/status.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/gtsmodel/status.go b/internal/gtsmodel/status.go
index 79c67c933..3bbe82c08 100644
--- a/internal/gtsmodel/status.go
+++ b/internal/gtsmodel/status.go
@@ -205,6 +205,12 @@ func (s *Status) BelongsToAccount(accountID string) bool {
return s.AccountID == accountID
}
+// IsLocal returns true if this is a local
+// status (ie., originating from this instance).
+func (s *Status) IsLocal() bool {
+ return s.Local != nil && *s.Local
+}
+
// StatusToTag is an intermediate struct to facilitate the many2many relationship between a status and one or more tags.
type StatusToTag struct {
StatusID string `bun:"type:CHAR(26),unique:statustag,nullzero,notnull"`