Add in-app notifications for moderation actions/warnings (#30065)
This commit is contained in:
parent
0ec061aa8f
commit
4ef0b48b95
13 changed files with 188 additions and 21 deletions
|
@ -9,6 +9,7 @@ class NotifyService < BaseService
|
|||
update
|
||||
poll
|
||||
status
|
||||
moderation_warning
|
||||
# TODO: this probably warrants an email notification
|
||||
severed_relationships
|
||||
).freeze
|
||||
|
@ -22,7 +23,7 @@ class NotifyService < BaseService
|
|||
|
||||
def dismiss?
|
||||
blocked = @recipient.unavailable?
|
||||
blocked ||= from_self? && @notification.type != :poll && @notification.type != :severed_relationships
|
||||
blocked ||= from_self? && %i(poll severed_relationships moderation_warning).exclude?(@notification.type)
|
||||
|
||||
return blocked if message? && from_staff?
|
||||
|
||||
|
@ -75,6 +76,7 @@ class NotifyService < BaseService
|
|||
admin.report
|
||||
poll
|
||||
update
|
||||
account_warning
|
||||
).freeze
|
||||
|
||||
def initialize(notification)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue