mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 12:52:27 -05:00
[bugfix] delete interaction requests when deleting account (#4278)
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl> # Description I recently noticed that pending interaction requests don't disappear on domain suspension. ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4278 Co-authored-by: nicole mikołajczyk <git@mkljczk.pl> Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
8b615391e5
commit
29d481d769
3 changed files with 32 additions and 0 deletions
|
|
@ -478,6 +478,12 @@ func (p *Processor) deleteAccountPeripheral(
|
|||
err != nil && !errors.Is(err, db.ErrNoEntries) {
|
||||
log.Errorf("error deleting poll votes by account: %v", err)
|
||||
}
|
||||
|
||||
// Delete all interaction requests from given account, local and remote.
|
||||
if err := p.state.DB.DeleteInteractionRequestsByInteractingAccountID(ctx, account.ID); // nocollapse
|
||||
err != nil && !errors.Is(err, db.ErrNoEntries) {
|
||||
log.Errorf("error deleting interaction requests by account: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// processSideEffect will process the given side effect details,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue