Add in-app notifications for moderation actions/warnings #30065
Merged
+189
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Corresponding notifications were already sent by mail but users sometimes overlook emails and miss moderation warnings.
API
This adds a
moderation_warning
notification type with amoderation_warning
attribute.These notifications have the recipient as
from_account
(like for lost relationships) and are never filtered.The
moderation_warning
attribute is a new entityAccountWarning
with the following attributes:id
:String
action
:String
, one ofnone
(warning only),disable
(account has been disabled),mark_statuses_as_sensitive
(specific statuses have been marked as sensitive),delete_statuses
(specific statuses have been removed),sensitive
(the account as a whole has been marked as sensitive content),silence
(the account has been limited),suspend
(the account has been suspended)target_account
: theAccount
who received the warning (always the current user in this context)appeal
:Appeal
entity, optionalstatus_ids
:Array
ofString
, the identifier of the (possibly deleted) statusesThe new
Appeal
entity has the following attributes:text
:String
, the text from the current user appealing the moderation actionstate
:String
, one ofapproved
,rejected
orpending
TODO
Fixes MAS-218