Description
Hello!
I am not a programmer or engineer so please forgive my lack of understanding or knowledge. I’m part of a nonprofit org that uses Rocket Chat server to host support chat rooms for youth. I’m trying to add bad words to the blacklist under Admin-Settings-Message but it seems to be not working. I added a bunch of bad words, separated by comma (example: fuck, fucking, shit), and saved changes. I tried testing it in both private and public channel using a test user account but the words still appear unfiltered. This used to work a while ago, the words used to have * as filter so it would show up at as ****. Am I doing something wrong? Is there another setting that I need to turn on/off? Any guidance would be greatly appreciated!
Thank you.
Server Setup Information
Version of Rocket.Chat Server: 5.2.0
Operating System: Windows 10
Deployment Method:
Number of Running Instances:
DB Replicaset Oplog:
NodeJS Version: 14.19.3
MongoDB Version: 4.2.8
Proxy:
Firewalls involved:
Any additional Information
hi @euanlgbtcenters !
Thanks for reaching out!
Indeed, this is a bug. We are refactoring the message parser, the component responsible to show - or not - messages.
if you go, now, to your preferences in Avatar > Preferences > Global and Activate “Use legacy message template”
You will see that it will works properly.
I will open up an issue for that in our Repository
Thanks!
Hi @dudanogueira
Thanks for the update. I toggled ‘use legacy message template’ and it worked. However, I saw this statement below the toggle: ‘This is a deprecated feature. It may not work as expected and will not get new updates’. Would this cause any issue?
Hi! it will solve your situation for now (notice that it will only change for the current user)
You are enabling the legacy message parser. So soon we should fix all issues we are finding on the new message parser.
However, whatever issues we find on the legacy parser, we will not be fixing, as we are moving forward with the new parser.
You should be fine
Hi @euanlgbtcenters !!
Because of your finding, we were able to tackle this issue together!
RocketChat:develop
← xareyli:badwords_filtering_not_working_on_new_message_parser
opened 12:09PM - 26 Nov 22 UTC
<!-- Your Pull Request name should start with one of the following tags
[NEW]… For new features
[IMPROVE] For an improvement (performance or little improvements) in existing features
[FIX] For bug fixes that affect the end-user
[BREAK] For pull requests including breaking changes
Chore: For small tasks
Doc: For documentation
-->
<!-- Checklist!!! If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
- I have read the Contributing Guide - https://github.com/RocketChat/Rocket.Chat/blob/develop/.github/CONTRIBUTING.md#contributing-to-rocketchat doc
- I have signed the CLA - https://cla-assistant.io/RocketChat/Rocket.Chat
- Lint and unit tests pass locally with my changes
- I have added tests that prove my fix is effective or that my feature works (if applicable)
- I have added necessary documentation (if applicable)
- Any dependent changes have been merged and published in downstream modules
-->
## Proposed changes (including videos or screenshots)
Was
![forGH](https://user-images.githubusercontent.com/118266546/204087809-fca6152b-63db-4873-88b8-d86aeb324531.png)
Now
![forGH2](https://user-images.githubusercontent.com/118266546/204087822-e3273127-a4f0-4a45-a73e-910eb48c9b6f.png)
<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue below.
This description will appear in the release notes if we accept the contribution.
-->
## Issue(s)
closes https://github.com/RocketChat/Rocket.Chat/issues/27298
## Steps to test or reproduce
1.) Turn off legacy message template (if on). `Account -> Preferences -> global -> Use legacy message template`
2.) Turn on filtering of bad words `Administration -> settings -> message -> Allow Message bad words filtering`
3.) Add bad words to the bad words list (comma separated) `Administration -> settings -> message -> Add Bad Words to the Blacklist`
4.) Write a message with bad words. They should be censored.
## Further comments
The bug happened because of precedence of message markdown parsing was higher than message censoring.
The fix will come in the 5.4.0 version!
Thanks!