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 boosted toots from blocked account not being retroactively removed from TL #14339

Merged

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Jul 16, 2020

Fixes #14301

Upon blocking someone, some cleanup code is called to remove content from the home timeline. Currently, this only removes toots directly posted by the blocked person, not boosts of such toots, nor toots mentioning them, which is inconsistent with how blocks filter toots.

This PR attempts to do so in a relatively efficient fashion. It should do up to 3 simple SQL queries leveraging indexes:

  • get reblog_of_idand account_id of all toots in the home TL (max 400 items, query matching an index)
  • of those which are reblogs, get which ones are from the newly-blocked account (max 400 items, query matching an index)
  • get which of the statuses have a mention to the newly-blocked account (max 800 items, query matching an index)

@ClearlyClaire ClearlyClaire marked this pull request as ready for review July 16, 2020 15:22
@Gargron Gargron merged commit 322d74f into mastodon:master Jul 17, 2020
shouo1987 pushed a commit to CrossGate-Pawoo/mastodon that referenced this pull request Dec 7, 2022
…d from TL (mastodon#14339)

* Fix boosted toots from blocked account not being retroactively removed from TL

Fixes mastodon#14301

* Add test for clear_from_timeline
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.

Block and mute does not eliminate content from blocked/muted user
2 participants