Skip to content

Add username symbols check filter #278

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

Merged
merged 1 commit into from
Apr 4, 2025
Merged

Conversation

umputun
Copy link
Owner

@umputun umputun commented Apr 4, 2025

  • Added new meta filter for detecting prohibited symbols in usernames
  • Allows admins to specify symbols (like '@') that should trigger spam detection when present in usernames
  • Added comprehensive tests and documentation

The filter is disabled by default for backward compatibility, but can be enabled using option or environment variable with a string of prohibited symbols.

This commit adds a new meta filter that checks if a username contains prohibited symbols.
- Added UsernameSymbolsCheck function to check for prohibited symbols in usernames
- Added comprehensive tests for the new filter
- Updated main.go to initialize and use the new filter
- Updated settings UI to display the new filter configuration
- Updated README.md to document the new filter
@umputun umputun requested a review from Copilot April 4, 2025 07:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • app/webapi/assets/settings.html: Language not supported

Copy link

Deploying tg-spam with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6b79f12
Status: ✅  Deploy successful!
Preview URL: https://0e288bb9.tg-spam.pages.dev
Branch Preview URL: https://feature-username-symbols-che.tg-spam.pages.dev

View logs

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.

1 participant