Merge remote-tracking branch 'parent/main' into upstream-20241107

This commit is contained in:
KMY 2024-11-07 08:33:20 +09:00
commit a003c2db89
98 changed files with 2002 additions and 590 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
@ -15,6 +15,7 @@ class NotifyService < BaseService
list_status
moderation_warning
severed_relationships
annual_report
).freeze
class BaseCondition
@ -28,6 +29,7 @@ class NotifyService < BaseService
poll
update
account_warning
annual_report
).freeze
def initialize(notification)
@ -103,7 +105,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?