From e890169e6f151f668580398685c2dbf3c4b780ff Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:24:49 +0100 Subject: use pointer for freshness window (#2614) --- internal/gtsmodel/status.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/gtsmodel') 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"` -- cgit v1.3