Add year in review feature to web UI (#32709)

This commit is contained in:
Eugen Rochko 2024-11-05 15:40:07 +01:00 committed by GitHub
parent 20a147170e
commit d6349c0e9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1103 additions and 21 deletions

View file

@ -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?