Merge branch 'main' into xvello/import-mutes

This commit is contained in:
Xavier Vello 2025-01-27 17:29:59 +01:00 committed by GitHub
commit f30ab4bae4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
328 changed files with 31571 additions and 115701 deletions

View file

@ -96,7 +96,7 @@ func (p *Processor) Delete(
}
// deleteUserAndTokensForAccount deletes the gtsmodel.User and
// any OAuth tokens and applications for the given account.
// any OAuth tokens, applications, and Web Push subscriptions for the given account.
//
// Callers to this function should already have checked that
// this is a local account, or else it won't have a user associated
@ -129,6 +129,10 @@ func (p *Processor) deleteUserAndTokensForAccount(ctx context.Context, account *
}
}
if err := p.state.DB.DeleteWebPushSubscriptionsByAccountID(ctx, account.ID); err != nil {
return gtserror.Newf("db error deleting Web Push subscriptions: %w", err)
}
columns, err := stubbifyUser(user)
if err != nil {
return gtserror.Newf("error stubbifying user: %w", err)