Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix owned account notes not being deleted when an account is deleted #16579

Merged

Conversation

ClearlyClaire
Copy link
Contributor

When an account is deleted while keeping its account record (which is the default when definitely suspending, or self-deleting a local account), account notes owned by this account are not deleted, unlike any other data owned by the deleted account.

In addition to keeping private data for longer than it should (possibly indefinitely), this also may be the root cause for the issue addressed in #16576.

This PR fixes DeleteAccountService to delete those account notes, and adds a migration script to automatically delete every already-orphaned account notes.

@ClearlyClaire ClearlyClaire force-pushed the fixes/account-notes-on-account-deletion branch from be29b5e to 21c89b0 Compare August 8, 2021 05:55
@Gargron Gargron merged commit 763ab0c into mastodon:main Aug 8, 2021
jesseplusplus pushed a commit to jesseplusplus/decodon that referenced this pull request Feb 10, 2022
…astodon#16579)

* Add account_notes relationship

* Add tests

* Fix owned account notes not being deleted when an account is deleted

* Add post-migration to clean up orphaned account notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants