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

Add displayname mention spam protection #537

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Conversation

H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Oct 3, 2024

Extend mention spam protection to handle displayname mentions.

All credit to half-shot

@H-Shay H-Shay marked this pull request as draft October 3, 2024 22:19
@H-Shay H-Shay marked this pull request as ready for review October 3, 2024 23:04
@H-Shay H-Shay requested a review from turt2live October 3, 2024 23:04
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

This is probably fine. The cache being live for 10-30 minutes is probably ideal, as otherwise we'd end up burning CPU when we hit the homeserver constantly.

We'll have to monitor resource usage particularly for large rooms like HQ.

src/protections/MentionSpam.ts Outdated Show resolved Hide resolved
Co-authored-by: Travis Ralston <travisr@matrix.org>
@H-Shay H-Shay merged commit c706068 into main Oct 4, 2024
5 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.

3 participants