summaryrefslogtreecommitdiff
path: root/internal/gtsmodel
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-03-12 15:34:08 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-12 14:34:08 +0000
commit1bcdf1da3bb10d564a6a56a89af5afa53e5cd78f (patch)
tree83716cea30d236c48e1655193c3adfc232e5bc75 /internal/gtsmodel
parent[chore] Update usage of OTEL libraries (#2725) (diff)
downloadgotosocial-1bcdf1da3bb10d564a6a56a89af5afa53e5cd78f.tar.xz
[feature] Process incoming `Move` activity (#2724)
* [feature] Process incoming account Move activity * fix targetAcct typo * put move origin account on fMsg * shift more move functionality back to the worker fn * simplify error logic
Diffstat (limited to 'internal/gtsmodel')
-rw-r--r--internal/gtsmodel/account.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go
index 82be86955..643dd62b8 100644
--- a/internal/gtsmodel/account.go
+++ b/internal/gtsmodel/account.go
@@ -187,6 +187,12 @@ func (a *Account) IsSuspended() bool {
return !a.SuspendedAt.IsZero()
}
+// IsMoving returns true if
+// account is Moving or has Moved.
+func (a *Account) IsMoving() bool {
+ return a.MovedToURI != "" || a.MoveID != ""
+}
+
// AccountToEmoji is an intermediate struct to facilitate the many2many relationship between an account and one or more emojis.
type AccountToEmoji struct {
AccountID string `bun:"type:CHAR(26),unique:accountemoji,nullzero,notnull"`