diff options
Diffstat (limited to 'internal/gtsmodel')
-rw-r--r-- | internal/gtsmodel/status.go | 6 |
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"` |