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

Integrate CleanSpeak for moderation #2

Merged
merged 3 commits into from
Dec 19, 2019
Merged

Integrate CleanSpeak for moderation #2

merged 3 commits into from
Dec 19, 2019

Conversation

trex
Copy link
Collaborator

@trex trex commented Dec 13, 2019

This change implements an integration with CleanSpeak for content filtering and moderation.

For both the createThread and createPost resolvers, we make a call to CleanSpeak's /content/item/moderate API and check the result to see if the content is allowed or rejected. We set published and abusive variables on the Thread or Post, which determine if the Thread or Post may be retrieved from the database.

The filters in CleanSpeak are highly tuneable, so we can run tests and adjust in development before we deploy an initial moderation policy and go live.

@trex
Copy link
Collaborator Author

trex commented Dec 13, 2019

@moonquay do yo want to review this?

@moonquay
Copy link

Oh cool thanks @trex for doing that! I see there's now a 'moderator' file. I like having the 'published' and 'abusive' variables on posts. Should we have a variable in between, something like 'flagged' for those posts that have been flagged by users and need classification by a moderator?

@trex
Copy link
Collaborator Author

trex commented Dec 16, 2019

@moonquay you raise a good point. There are a few states that a post can have, and all of the ones that I can think of currently relate to a post being abusive:

  • Post is created and does not trigger the content filter - publish immediately
  • Post is created and triggers the content filter - do not publish
    • Moderator approves triggered post - publish post
    • Moderator does not approve triggered post - do not publish

So I don't think we need the published field, and can update the abusive field to have more than two states, we can achieve this by making abusive an enumerated type.

I will update the code based on this feedback. Thanks @moonquay

@trex
Copy link
Collaborator Author

trex commented Dec 17, 2019

@moonquay I pushed some changes to add a rich Moderation type to both Thread and Post. This will be flexible enough for the future if we want to track user moderation feedback, such as tracking abuse/spam reports from users and unpublishing if they cross some threshold.

@moonquay
Copy link

moonquay commented Dec 17, 2019 via email

@trex
Copy link
Collaborator Author

trex commented Dec 18, 2019 via email

@trex trex merged commit 2e51e9b into master Dec 19, 2019
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.

2 participants