diff options
author | 2022-03-15 16:12:35 +0100 | |
---|---|---|
committer | 2022-03-15 16:12:35 +0100 | |
commit | 532c4cc6978a7fe707373106eebade237c89693a (patch) | |
tree | 937bf0a44ef2a8d8d366786693decf2c65b20db5 /internal/processing/account/account.go | |
parent | [performance] Add dereference shortcuts to avoid making http calls to self (#... (diff) | |
download | gotosocial-532c4cc6978a7fe707373106eebade237c89693a.tar.xz |
[feature] Federate local account deletion (#431)
* add account delete to API
* model account delete request
* add AccountDeleteLocal
* federate local account deletes
* add DeleteLocal
* update transport (controller) to allow shortcuts
* delete logic + testing
* update swagger docs
* more tests + fixes
Diffstat (limited to 'internal/processing/account/account.go')
-rw-r--r-- | internal/processing/account/account.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/processing/account/account.go b/internal/processing/account/account.go index b2321f414..c670ee24a 100644 --- a/internal/processing/account/account.go +++ b/internal/processing/account/account.go @@ -42,7 +42,10 @@ type Processor interface { Create(ctx context.Context, applicationToken oauth2.TokenInfo, application *gtsmodel.Application, form *apimodel.AccountCreateRequest) (*apimodel.Token, error) // Delete deletes an account, and all of that account's statuses, media, follows, notifications, etc etc etc. // The origin passed here should be either the ID of the account doing the delete (can be itself), or the ID of a domain block. - Delete(ctx context.Context, account *gtsmodel.Account, origin string) error + Delete(ctx context.Context, account *gtsmodel.Account, origin string) gtserror.WithCode + // DeleteLocal is like delete, but specifically for deletion of local accounts rather than federated ones. + // Unlike Delete, it will propagate the deletion out across the federating API to other instances. + DeleteLocal(ctx context.Context, account *gtsmodel.Account, form *apimodel.AccountDeleteRequest) gtserror.WithCode // Get processes the given request for account information. Get(ctx context.Context, requestingAccount *gtsmodel.Account, targetAccountID string) (*apimodel.Account, error) // Update processes the update of an account with the given form |