liberapay.com
liberapay.com copied to clipboard
Add a report user button
This is a work in progress. Feel free to comment the choice I made in the UI.
It aims to fix #353
Do you mean "report" a user?
Need to add documentation for users as well.
The wording is "report" not signal as @mattbk mentioned, signal doesn't really make sense as people know what reporting is.
Also, spelling/grammar issues:
What happen when I signal a user
Should be "What happens when I report a user?"
The profil will be review by the moderator.
Should be "The profile will be reviewed by a moderator."
I performed the requested change but the button still doesn't do anything for now.
Need to add documentation for users as well.
@mattbk What do you mean by that? I put a little FAQ below the report form.
I think a link to more detail is needed. Who are the moderators, what powers do they have, what's the process, etc.
@mattbk I updated the FAQ accordingly to the proposition made there: https://github.com/liberapay/liberapay.org/issues/15#issuecomment-414093827
How can I go further with this?
I would say we should add a kind of role attribute to a user to differenciate a regular user from a moderator.
Then a simple email or notification would be sent to the 10 moderators that would be triggered everytime a user click the report button.
@Changaco Any thought about this?
Away from computer right now, but admins in Gratipay before this was forked were distinguished by a column in the participant table called is_admin. Then testing whether a user was an admin was possible by querying the current user.
A similar system could be set up for mods if this is still true in Liberapay.
Then you would need a voting mechanism for reports and to record who voted what or a simple count.
Additional feature would be discussion of reports on top of voting.
But for a quicker release, quarantining a suspicious user could be done manually by an admin.
Your right: just notifying the admin would be a minimum.
I recently report a facebook page and they have a pretty way to handle it: When the moderator have examined the suspicious page, a report is sent to the user (but like you say, this would be additional features).
I replaced the is_admin
column with a more generic privileges
column 2 years ago in 63900b45385bfb62be105c324cc53d45154e3c57. I have a local branch to add a new moderate
privilege, but it's not ready yet.
@Changaco Awesome! I guess the unknown part I have to do when the button clicked is something like:
warning = "The following account has been reported:" + reportedAccount
foreach user in users where user.privileges & moderate != 0
notifications.sent(user, warning)
Any code example I could go from to:
- do the moderator user request
- send the notification
Would anything from liberapay.com/tests/py/test_notifications.py help you out?
Should probably add a test there anyway.