Add year in review feature to web UI (#32709)
This commit is contained in:
parent
20a147170e
commit
d6349c0e9a
38 changed files with 1103 additions and 21 deletions
|
@ -3,7 +3,7 @@
|
|||
class NotifyService < BaseService
|
||||
include Redisable
|
||||
|
||||
# TODO: the severed_relationships type probably warrants email notifications
|
||||
# TODO: the severed_relationships and annual_report types probably warrants email notifications
|
||||
NON_EMAIL_TYPES = %i(
|
||||
admin.report
|
||||
admin.sign_up
|
||||
|
@ -12,6 +12,7 @@ class NotifyService < BaseService
|
|||
status
|
||||
moderation_warning
|
||||
severed_relationships
|
||||
annual_report
|
||||
).freeze
|
||||
|
||||
class BaseCondition
|
||||
|
@ -25,6 +26,7 @@ class NotifyService < BaseService
|
|||
poll
|
||||
update
|
||||
account_warning
|
||||
annual_report
|
||||
).freeze
|
||||
|
||||
def initialize(notification)
|
||||
|
@ -100,7 +102,7 @@ class NotifyService < BaseService
|
|||
class DropCondition < BaseCondition
|
||||
def drop?
|
||||
blocked = @recipient.unavailable?
|
||||
blocked ||= from_self? && %i(poll severed_relationships moderation_warning).exclude?(@notification.type)
|
||||
blocked ||= from_self? && %i(poll severed_relationships moderation_warning annual_report).exclude?(@notification.type)
|
||||
|
||||
return blocked if message? && from_staff?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue