Create spam management for comments
The problem
Comments spam persists on the PublicLab.org site even when their author has been banned. Individual comments cannot be marked as spam, so they must be deleted.
Proposed fix
- [ ] add
comment.statuscolumn - [ ] mark all banned users' comments as
status = 0to unpublish - [ ] add
where(status: 1)to all comment displays - [ ] add buttons to comments, visible to mods and admins, for spamming and unspamming comments
While we are waiting for these enhancements, moderators could remember that after a research note is marked as spam, any comments on that note should be deleted so they don't appear in the list of recent comments..
@jywarren Hi!. This seems like something neccessary and doable. Could you kindly point me towards the neccessary code in order to do this. Also, How do I know that a particular use who is commenting , is banned ?. Thanks in advance. :)
Users each have a status category which should be 1 -- docs here: https://github.com/publiclab/plots2/blob/master/app/models/drupal_users.rb
Great, please break this up into smaller sub-issues, so that multiple people can work on it at once, and also so that it's easier to assess (and write tests for) each step -- thank you! Moderation functions are especially important to thoroughly test and though I'm traveling at the moment and less able to help day-to-day, I can take some time to advise on good testing as we go. Also perhaps @publiclab/reviewers could contribute their thoughts. Start with unit tests, and good luck!
Merging into #1785 -- Thanks!