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 support for silently filtered words #42

Merged
merged 7 commits into from
Jun 5, 2024
Merged

Conversation

SlimShadyIAm
Copy link
Member

@SlimShadyIAm SlimShadyIAm commented May 19, 2024

Closes #39

Description

We want to be able to detect when certain keywords are mentioned and notify moderators without removing the message.

Changes

  • Extend FilterWord model with new silent_filter property which defaults to false
  • New command /silent_filter to toggle silent filter mode on already filtered words
  • /filter list shows when a word is silently filtered
  • Ignore silently filtered words in commands that typically stop executing/return when a filtered word is triggered (i.e when you search a package in Canister with a filtered word as the query)
  • Generate report for silently filtered words, but don't delete the word, ratelimit the user or send them a message privately

@SlimShadyIAm SlimShadyIAm requested a review from a team May 19, 2024 17:33
@SlimShadyIAm SlimShadyIAm force-pushed the feature/silent-filter branch from fe8b44c to 9fe60ad Compare May 19, 2024 17:51
@SlimShadyIAm SlimShadyIAm force-pushed the feature/silent-filter branch from 9fe60ad to 8e94e0e Compare May 19, 2024 17:57
Copy link
Contributor

@BBaoVanC BBaoVanC left a comment

Choose a reason for hiding this comment

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

I am not familiar enough with the codebase to do a meaningful review, so that is what I have found

config.example.json Outdated Show resolved Hide resolved
data/model/filterword.py Outdated Show resolved Hide resolved
utils/framework/filter.py Outdated Show resolved Hide resolved
@SlimShadyIAm SlimShadyIAm merged commit 5222b03 into main Jun 5, 2024
@SlimShadyIAm SlimShadyIAm deleted the feature/silent-filter branch June 5, 2024 15:53
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.

Support silent filters
2 participants