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

PLANNING ISSUE: Spam comments moderation #2304

Closed
6 tasks done
grvsachdeva opened this issue Feb 12, 2018 · 26 comments · Fixed by #2373, #2957 or #3065
Closed
6 tasks done

PLANNING ISSUE: Spam comments moderation #2304

grvsachdeva opened this issue Feb 12, 2018 · 26 comments · Fixed by #2373, #2957 or #3065
Assignees
Labels
enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature planning Planning issues!
Milestone

Comments

@grvsachdeva
Copy link
Member

grvsachdeva commented Feb 12, 2018

A user when banned by moderators, the alert text said that banning the author would remove all their content from the site -- but it did not. This is a bug.So, for handling this a comment moderation system needs to be built as discussed in #1785 .

  • make a "status" column for comments, default 1, spam = 0
  • make a "spam" method like this, that only moderators or admins can use (user.role == admin): https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L158
  • a "publish" method which sets status back to 1
  • unit test the above 2 methods
  • display comments (on dashboard, /research, in answers, wiki pages and notes) only if they have status == 1
  • display spammed comments to admins and moderators (user.role == admin || user.role...) but with text hidden, with a notice "A comment by @______ was put in moderation. Read the full comment" which displays the text, and a "republish" button
@grvsachdeva
Copy link
Member Author

Hi, @jywarren as per the first part status column needs to be added but it's already there with the default value of 0 (for published). So, I am starting with 2nd part and giving spam comment as status = 2.

@grvsachdeva grvsachdeva added enhancement explains that the issue is to improve upon one of our existing features in-progress feature explains that the issue is to add a new feature labels Feb 12, 2018
@jywarren jywarren added this to the Spam milestone Feb 15, 2018
@jywarren
Copy link
Member

This is looking awesome! Want to add "Planning issue" to the title? :-) 🎉

@grvsachdeva grvsachdeva reopened this Feb 20, 2018
@jywarren jywarren changed the title Spam comments moderation Planning issue: Spam comments moderation Feb 20, 2018
@ebarry ebarry changed the title Planning issue: Spam comments moderation PLANNING ISSUE: Spam comments moderation Feb 21, 2018
@jywarren jywarren added the planning Planning issues! label May 3, 2018
@grvsachdeva
Copy link
Member Author

Hi @jywarren , sorry it was still open. Let's complete this ASAP.

@ghost ghost added the in progress label Jun 30, 2018
@grvsachdeva
Copy link
Member Author

Raised PR at #2957 . Also, I have gone through the work done by me in past. Just last 2 parts remaining.

The comments generated after PR #2373 would be having status = 1 but comments before that would be carrying status = 0 . Could you please check stats @jywarren?

We need to run a migration on production DB to change the status of all comments to 1 and the next step would be to merge #2957. Thanks!

@grvsachdeva
Copy link
Member Author

display spammed comments to admins and moderators (user.role == admin || user.role...) but with text hidden, with a notice "A comment by @______ was put in moderation. Read the full comment" which displays the text, and a "republish" button

@jywarren , any more details you wanna add to this part of issue?

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Jun 30, 2018

Quick Checklist for this issue:

  • A button with each comment to mark it as spam
  • Addition of new tab at /spam which would show spammed comments with option to spam/unspam comment
  • Addition of Spam / Publish button with each comment on profile page

@jywarren how about this ? Please add if anything else required? Thanks!

@jywarren
Copy link
Member

This is great. Maybe also that when a user is banned their comments should be moderated as well!

@grvsachdeva
Copy link
Member Author

Adding this to checklist. @jywarren have you run migration for changing comment status to 1?

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018

Uhhhhh, hmm, sorry i think i need a refresher -- but any migrations that've been merged have definitely been run!

@grvsachdeva
Copy link
Member Author

We ran a migration in #2373 but that is only for changing the default comment status to 1 so currently, production DB would be carrying comments with status 0 as well as 1. So, now we can run a query on production DB to change the status to 1. What do you think?

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018 via email

@grvsachdeva
Copy link
Member Author

Actually, in #2373 I included a statement for that but it didn't work that time, but I will try a PR with migration again. Thanks!

@jywarren
Copy link
Member

jywarren commented Jul 3, 2018 via email

@ghost ghost removed the in progress label Jul 10, 2018
@jywarren
Copy link
Member

Ah, oops reopening this as we still have a few items left like buttons. Thanks!

@jywarren jywarren reopened this Jul 11, 2018
@grvsachdeva
Copy link
Member Author

Hi @jywarren @steviepubliclab here's the progress on this issue:-

  1. The comment moderation system is working, moderators can now mark any comment as spam

  2. I just raised PR for the comments tab where all the spammed comments will appear
    spam_mod

  3. At start of the issue, one of the part was to add buttons on the profile page with each comment so that moderators can see if the spammy user has left any comments or not. The comment section looks like this right now
    comment_section

A bit loaded from data from my point of view.
So, I want to know from you guys, what do you think and where we can add Mark as spam button?
Thank you!

@grvsachdeva
Copy link
Member Author

Hi @jywarren @steviepubliclab, we can also display spammy comments on the note only to moderator as previously decided as per checklist. What do you guys think?

display spammed comments to admins and moderators (user.role == admin || user.role...) but with text hidden, with a notice "A comment by @______ was put in moderation. Read the full comment" which displays the text, and a "republish" button

@grvsachdeva grvsachdeva mentioned this issue Jul 16, 2018
5 tasks
@steviepubliclab
Copy link
Contributor

steviepubliclab commented Jul 17, 2018 via email

@jywarren
Copy link
Member

Hi! I think we could probably make more columns in the table to better organize it so it's easier to skim through. What do you think?

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Jul 17, 2018

Hi @steviepubliclab !

  1. What causes a comment to show up in the potential spam section? I
    assuming first-time commenters/posters?

If a moderator marks a comment as spam using "Mark as spam" button, then that comment would appear at /spam/comments

  1. Are first time comments now moderated until approved?

No, they are not, I can work on this one next. What do you say?

  1. I'm not sure if you know this yet, or we've decided on it, but will the
    moderation group gets an email notification for new comments?

Depends if we are implementing first-time comment moderation or not

  1. Can you tell me more about what you mean when you said "it's a bit
    loaded from data?"

Initially, we have planned to add "Mark as spam" button to each comment on the user profile page, but adding a button on current view can make it look messy.
Agreed with @jywarren, we can organize it.

Thanks!

@grvsachdeva grvsachdeva reopened this Jul 17, 2018
@jywarren
Copy link
Member

yes - this list is almost complete; but there are lots of small follow-ons and variations that could also help. Patrick suggested: moderating a user would also moderate all their comments and we can add that to this list.

The feature of holding all first-time comments for moderation would also be a bit of a project but we can add it to the list too if folks think it's time for that.

@grvsachdeva
Copy link
Member Author

grvsachdeva commented Sep 10, 2018

Hi @jywarren, here's the new checklist for the follow-up parts of this issue.

  • Holding first-time comments for moderation
  • Moderation of user affecting his comments

@publiclab/community-reps please add more parts to this checklist and please give thumbs up 👍 to those parts which you think are ready to be implemented. I would be happy to break each part of the checklist further down to small issues. Thanks!

@steviepubliclab
Copy link
Contributor

Hi! Sorry missed this one. Yes - I think we need to moderate first time comments. A lot of them have been some pretty bad spam lately!

Thanks
-Stevie

@jywarren
Copy link
Member

for Moderation of user affecting his comments that means /all/ their comments are moderated when you moderate the user?

I think this is good. But I think we may need to make the 'moderate comment' button NOT ban the user... or we need two buttons -- ban the user entirely AND all their comments, OR moderate just the one comment.

This is a lot of extra work! I really appreciate it and I wonder if some of this could be made into tasks for GCI to reduce your workload at all?

@grvsachdeva
Copy link
Member Author

Yes, breaking both the parts into further parts is better. I would be starting with Moderating first-timer comments system. Thanks @jywarren @steviepubliclab !

@jywarren
Copy link
Member

THANK YOU!!!

@grvsachdeva
Copy link
Member Author

Hi @steviepubliclab @jywarren @ebarry the comment moderation system is up and complete, finallly 🎉 . DO CHECK it's working.

Some follow-up areas which need integration are answer's comments and wiki's comments. i have opened a folllow-up for it at #4550 . Going to close this planning issue now.

Your comments are welcome and if you find any suspicious activity regarding the moderation system. Feel free to mention me here or by opening new issue. Thanks all for collaborating on this one and helping in it's completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement explains that the issue is to improve upon one of our existing features feature explains that the issue is to add a new feature planning Planning issues!
Projects
None yet
4 participants