diff options
Diffstat (limited to 'internal/api/model')
-rw-r--r-- | internal/api/model/account.go | 20 | ||||
-rw-r--r-- | internal/api/model/source.go | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/internal/api/model/account.go b/internal/api/model/account.go index a8851ddcb..46b043f80 100644 --- a/internal/api/model/account.go +++ b/internal/api/model/account.go @@ -96,6 +96,9 @@ type Account struct { // Role of the account on this instance. // Omitted for remote accounts. Role *AccountRole `json:"role,omitempty"` + // If set, indicates that this account is currently inactive, and has migrated to the given account. + // Omitted for accounts that haven't moved, and for suspended accounts. + Moved *Account `json:"moved,omitempty"` } // AccountCreateRequest models account creation parameters. @@ -213,6 +216,23 @@ type AccountDeleteRequest struct { Password string `form:"password" json:"password" xml:"password"` } +// AccountMoveRequest models a request to Move an account. +// +// swagger:ignore +type AccountMoveRequest struct { + // Password of the account's user, for confirmation. + Password string `form:"password" json:"password" xml:"password"` + // ActivityPub URI of the account that's being moved to. + MovedToURI string `form:"moved_to_uri" json:"moved_to_uri" xml:"moved_to_uri"` +} + +// AccountAliasRequest models a request +// to set an account's alsoKnownAs URIs. +type AccountAliasRequest struct { + // ActivityPub URIs of any accounts that this one is being aliased to. + AlsoKnownAsURIs []string `form:"also_known_as_uris" json:"also_known_as_uris" xml:"also_known_as_uris"` +} + // AccountRole models the role of an account. // // swagger:model accountRole diff --git a/internal/api/model/source.go b/internal/api/model/source.go index a2c78ac78..3b57f8565 100644 --- a/internal/api/model/source.go +++ b/internal/api/model/source.go @@ -38,4 +38,9 @@ type Source struct { Fields []Field `json:"fields"` // The number of pending follow requests. FollowRequestsCount int `json:"follow_requests_count"` + // This account is aliased to / also known as accounts at the + // given ActivityPub URIs. To set this, use `/api/v1/accounts/alias`. + // + // Omitted from json if empty / not set. + AlsoKnownAsURIs []string `json:"also_known_as_uris,omitempty"` } |