use pointer for freshness window (#2614)

This commit is contained in:
tobi 2024-02-09 15:24:49 +01:00 committed by GitHub
commit e890169e6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 191 additions and 95 deletions

View file

@ -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"`