-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add moderation warnings #9519
Add moderation warnings #9519
Conversation
4c58062
to
3a8a955
Compare
3a8a955
to
1857971
Compare
I think it would make sense to include account and instance in the subject line and message. Tentative suggestion:
|
1857971
to
032339f
Compare
Updated table. |
Suggest additional text after the custom text, along the lines of: disable: "Please contact <admin email address> to discuss re-enabling your login." |
Replace individual routes for disabling, silencing, and suspending a user, as well as the report update route, with a unified account action controller that allows you to select an action (none, disable, silence, suspend) as well as whether it should generate an e-mail notification with optional custom text. That notification, with the optional custom text, is saved as a warning. Additionally, there are warning presets you can configure to save time when performing the above.
What's mean "none"? |
032339f
to
1b1f184
Compare
None means no action against the account, allows you to just send a warning e-mail. Sending a warning with no action when coming from a report will mark that particular report as closed. |
I suggest to send this kind of emails to the reporters. |
@@ -13,75 +13,42 @@ def show | |||
authorize @report, :show? | |||
|
|||
@report_note = @report.notes.new | |||
@report_notes = (@report.notes.latest + @report.history).sort_by(&:created_at) | |||
@report_notes = (@report.notes.latest + @report.history + @report.target_account.targeted_account_warnings.latest.custom).sort_by(&:created_at) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be time to create a view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases this is only 4-5 items at most in total. That being said, how do I query a view in Rails?
|
||
scope :latest, -> { order(created_at: :desc) } | ||
scope :custom, -> { where.not(text: '') } | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate the enum and create a constant for future reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate the enum how? I believe the enum can't be set to a value that isn't defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right I forgot rails does that!
Is "Notify the user per email" the same meaning as "Notify the user by email"? I've not seen it written that way before. |
I tend to see/use "via" rather than "by", but agree that "per" seems unusual, and may in fact have a different meaning than intended. ("Per" generally means "in accordance with".) |
It should be "by", my mistake |
* Add moderation warnings Replace individual routes for disabling, silencing, and suspending a user, as well as the report update route, with a unified account action controller that allows you to select an action (none, disable, silence, suspend) as well as whether it should generate an e-mail notification with optional custom text. That notification, with the optional custom text, is saved as a warning. Additionally, there are warning presets you can configure to save time when performing the above. * Use Account#local_username_and_domain
Moderation warnings are meant to formalize the process of warning users about their misconduct prior to harsher measures, so that other staff can track that process. At the same time, the warning system is meant to solve the issue of absolute intransparency about moderation actions concerning your account, i.e. if you are banned, you won't know when and why you were banned.
However, sometimes moderation actions need to be covert, and as such, you can opt to generate no warnings/e-mails when perfming said actions.
In terms of moderation UI, whereas previously, "disable" and "silence" were one-click actions, now they are unified into a form that allows you to enter warning text (or choose from custom presets to save time). That form likewise oversees the "suspend" action, which previously was on a separate page that required you to enter the username of the account for confirmation (that is no longer so).
That new form is not only unified between various actions, but also between actions that are part of a report, and actions taken directly from the account page. Of course, warnings can only be sent to local users.
Action UI:
E-mail the user receives:
Warning presets UI:
Here are the e-mail contents for various action types:
Below this explanation, you can enter custom text, or choose one of the preset options. You can add presets.
The e-mail also contains a link to "review server policies" at /about/more