-
Notifications
You must be signed in to change notification settings - Fork 31
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
Slur Filter Warning #867
Slur Filter Warning #867
Conversation
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.
Looks good! I've left a couple minor suggestions. It also appears that the slur filter does not get reset when switching to an instance with no slur filter:
- Switch to a
lemmy.ml
account (or an account on any instance with slur filter) - Switch to
test-mlem
(or an account on any instance without a slur filter) - Try to compose a post with a slur
The slur filter from the previous instance will still be applied
Fixed! |
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.
LGTM!
Background
Lemmy allows instances to set a slur filter. Users cannot create posts that match the filter regex. The user can create a comment that matches the regex - however, all matches contained within the comment are replaced with
*removed*
.Implementation
This PR modifies the
PostComposerView
to show a"xyz" is disallowed
banner if the post matches the slur filter regex. The regex is checked dynamically every time the post content is modified.This improves the user experience - previously, the user would just get an
"error: slur"
notification, with no hint of where in the post the slur is. This could have been confusing, especially if a slur was included accidentally as part of another word, or the user was unaware that their instance blocked a certain word (an example would be"bitch"
onlemmy.ml
).What about comments?
Edit: Added for comments too!
Original message:
Should I implement something similar for comments? Lemmy doesn't actually stop the user from posting a comment containing slurs. I'm not sure what the best approach is here. Do we stop the user from posting their comment? Do we still allow them to post, but give them a warning? Or do we not do anything at all?