summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/status.go
diff options
context:
space:
mode:
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 5f50fb046..70fd9c367 100644
--- a/internal/gtsmodel/status.go
+++ b/internal/gtsmodel/status.go
@@ -212,6 +212,12 @@ func (s *Status) IsLocal() bool {
return s.Local != nil && *s.Local
}
+// IsLocalOnly returns true if this status
+// is "local-only" ie., unfederated.
+func (s *Status) IsLocalOnly() bool {
+ return s.Federated == nil || !*s.Federated
+}
+
// 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"`