Moderation module for comments#59
Open
taitus wants to merge 9364 commits into
Open
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objectives
Define a "dictionary" (moderated texts), which builds a dynamic algorithm that detects comments with words considered offensive to the community
Hide offensive comments to the public, except under the
Commentstab underUsers#show, where the comment can be seen along with aModeratedtagThe comment's author can edit their offensive comment until no offenses are detected; the recorded offense is also removed from the backend so that no action can be taken upon it
An admin can "decline" or "confirm" these offenses —the former meaning the moderated comment will be shown again, while the latter hides the comment permanently (shadowban-like behavior)
Visual Changes
Notice when a comment including an offense is created:
Comments section (with offensive comments) after reload:
Commentstab underUsers#showwhen a comment is offensive:View when editing an offensive comment:
Commentstab underUsers#showafter an offensive comment is corrected:Commentstab underUsers#showfor another user with offensive comments other than the currently logged-in one (this is also what an user would see if the comment is deemed offensive by an admin):Admin panel for moderated words:
Admin panel for moderated words when a word has related offenses:
Admin panel for actions that can be taken upon offenses:
Admin panel when offenses have been moderated:
Commentstab underUsers#showwhen an comment is deemed as non-offensive by an admin:Notes
This change would only affect comments once merged, and after a "dictionary" is defined; to moderate previous comments, a Rake task would be needed
This PR is only aimed at comments, so while some logic from this feature is generic in case is ported somewhere in the future to other resources that are considered moderable, some work (i.e.: define a
Moderableconcern) is needed to fully abstract said behavior