mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 14:52:26 -05:00
[feature] Use local_only field, deprecate federated field (#3222)
* [feature] Use `local_only` field, deprecate `federated` field * use `deprecated` comment for form.Federated * nolint
This commit is contained in:
parent
ffcf6e73f7
commit
53fccb8af8
13 changed files with 233 additions and 171 deletions
|
|
@ -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"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue