-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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: Filtering non ascii bad words #35418
base: develop
Are you sure you want to change the base?
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 41d1cf8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35418 +/- ##
===========================================
- Coverage 59.44% 59.43% -0.01%
===========================================
Files 2829 2829
Lines 68324 68345 +21
Branches 15130 15134 +4
===========================================
+ Hits 40612 40620 +8
- Misses 25054 25067 +13
Partials 2658 2658
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
@kody start-review |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
apps/meteor/server/services/messages/hooks/BeforeSaveBadWords.ts
Outdated
Show resolved
Hide resolved
apps/meteor/server/services/messages/hooks/BeforeSaveBadWords.ts
Outdated
Show resolved
Hide resolved
apps/meteor/server/services/messages/hooks/BeforeSaveBadWords.ts
Outdated
Show resolved
Hide resolved
|
} catch (error) { | ||
this.badWordsRegex = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
silently consuming the error. can we log this pls?
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
SUP-704
This pull request aims to enhance the content moderation capabilities of the Rocket.Chat application by improving the bad words filtering system. It introduces support for filtering non-ASCII bad words, allowing for better moderation of messages in languages other than English. The changes include the addition of regex-based pattern matching to the existing bad words filter, which improves word boundary detection and ensures more consistent censorship of inappropriate language. These updates are implemented in the
BeforeSaveBadWords.ts
file and documented in the.changeset/witty-ads-visit.md
file. The source branch for these changes isfix/non-ascii-bad-words
, and the target branch isdevelop
.