diff options
author | 2021-09-30 10:56:02 +0200 | |
---|---|---|
committer | 2021-09-30 10:56:02 +0200 | |
commit | 36a09dd0df06e1b6f64347ed3d3c2c8ca963fc73 (patch) | |
tree | 78e032fecd7c2e6b0260c2a285d9d3bc1238ffcb /internal/processing/fromfederator.go | |
parent | upstep bun to v1.0.9 (#252) (diff) | |
download | gotosocial-36a09dd0df06e1b6f64347ed3d3c2c8ca963fc73.tar.xz |
handle remote account deletion more systematically (#254)
Diffstat (limited to 'internal/processing/fromfederator.go')
-rw-r--r-- | internal/processing/fromfederator.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/processing/fromfederator.go b/internal/processing/fromfederator.go index feb22b2ba..ffaf625d3 100644 --- a/internal/processing/fromfederator.go +++ b/internal/processing/fromfederator.go @@ -181,7 +181,13 @@ func (p *processor) ProcessFromFederator(ctx context.Context, federatorMsg messa return p.deleteStatusFromTimelines(ctx, statusToDelete) case ap.ObjectProfile: // DELETE A PROFILE/ACCOUNT - // TODO: handle side effects of account deletion here: delete all objects, statuses, media etc associated with account + // handle side effects of account deletion here: delete all objects, statuses, media etc associated with account + account, ok := federatorMsg.GTSModel.(*gtsmodel.Account) + if !ok { + return errors.New("account delete was not parseable as *gtsmodel.Account") + } + + return p.accountProcessor.Delete(ctx, account, account.ID) } case ap.ActivityAccept: // ACCEPT |