Exempt some notification types from notification filtering (#29565)

This commit is contained in:
Claire 2024-03-13 11:17:55 +01:00 committed by GitHub
parent 46e902f1f3
commit 27fd084cb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,6 +68,13 @@ class NotifyService < BaseService
NEW_FOLLOWER_THRESHOLD = 3.days.freeze
NON_FILTERABLE_TYPES = %i(
admin.sign_up
admin.report
poll
update
).freeze
def initialize(notification)
@notification = notification
@recipient = notification.account
@ -76,6 +83,7 @@ class NotifyService < BaseService
end
def filter?
return false if NON_FILTERABLE_TYPES.include?(@notification.type)
return false if override_for_sender?
from_limited? ||