summaryrefslogtreecommitdiff
path: root/internal/processing/account/delete.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/account/delete.go')
-rw-r--r--internal/processing/account/delete.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/processing/account/delete.go b/internal/processing/account/delete.go
index 075e94544..702b46cda 100644
--- a/internal/processing/account/delete.go
+++ b/internal/processing/account/delete.go
@@ -460,6 +460,14 @@ func (p *Processor) deleteAccountPeripheral(ctx context.Context, account *gtsmod
// TODO: add status mutes here when they're implemented.
+ // Delete all conversations owned by given account.
+ // Conversations in which it has only participated will be retained;
+ // they can always be deleted by their owners.
+ if err := p.state.DB.DeleteConversationsByOwnerAccountID(ctx, account.ID); // nocollapse
+ err != nil && !errors.Is(err, db.ErrNoEntries) {
+ return gtserror.Newf("error deleting conversations owned by account: %w", err)
+ }
+
// Delete all poll votes owned by given account.
if err := p.state.DB.DeletePollVotesByAccountID(ctx, account.ID); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {