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

Filter posts containing mute words from search and notifications #5599

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Oct 3, 2024

Copies out the filtering and page reuse logic from post-feed.ts into these queries and applies post moderation to applicable data.

Notifications handling

Muted users are already filtered out of notifications. This PR filters replies, quote posts, and mentions that contain muted words from the feed as well, meaning they are not shown at all.

Search handling

By applying moderatePost to the search results, this PR filters out any posts by muted users, or posts containing muted words. Previously both were present in the results, though muted accounts did have a PostAlerts pill on them showing "Account muted".

However, if you search for a specific user e.g. from:esb.lol, this filtering is NOT applied, though other post moderation like pills and ContentHider is. The thinking here is to match what you get if you visit a muted users profile directly: you see all their posts, and posts containing mute words are hidden by ContentHider.

Copy link

github-actions bot commented Oct 3, 2024

Old size New size Diff
7.92 MB 7.92 MB 89 B (0.00%)

@dolciss
Copy link
Contributor

dolciss commented Oct 3, 2024

Let me ask you a question.
Since this change uses @atproto/api's ModerateAPI,
will it filter not only mute words, but also labeling, account mutes and blocks?

@surfdude29
Copy link
Contributor

This is definitely a welcome change 🙏

Will it be a step towards fixing #3234? Or is that an entirely separate issue? 🤔

* origin/main:
  Make composer reducer source of truth for images/video when publishing (#5595)
  Track links and embeds in the composer reducer (#5593)
  Bump SDK (#5602)
  Update built asset caching (#5601)
  Downgrade sentry to recommended 5.24.3 (#5604)
  Add option to search in any language (#5598)
  Font tweaks (#5597)
@arcalinea arcalinea temporarily deployed to mute-words-updates - social-app PR #5599 October 4, 2024 19:15 — with Render Destroyed
Copy link
Member

@mozzius mozzius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well! Big improvement

@estrattonbailey estrattonbailey merged commit 1db39ed into main Oct 8, 2024
6 checks passed
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.

5 participants