mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 14:31:48 +01:00
Exempt some notification types from notification filtering (#29565)
This commit is contained in:
parent
46e902f1f3
commit
27fd084cb5
1 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,13 @@ class NotifyService < BaseService
|
||||||
|
|
||||||
NEW_FOLLOWER_THRESHOLD = 3.days.freeze
|
NEW_FOLLOWER_THRESHOLD = 3.days.freeze
|
||||||
|
|
||||||
|
NON_FILTERABLE_TYPES = %i(
|
||||||
|
admin.sign_up
|
||||||
|
admin.report
|
||||||
|
poll
|
||||||
|
update
|
||||||
|
).freeze
|
||||||
|
|
||||||
def initialize(notification)
|
def initialize(notification)
|
||||||
@notification = notification
|
@notification = notification
|
||||||
@recipient = notification.account
|
@recipient = notification.account
|
||||||
|
@ -76,6 +83,7 @@ class NotifyService < BaseService
|
||||||
end
|
end
|
||||||
|
|
||||||
def filter?
|
def filter?
|
||||||
|
return false if NON_FILTERABLE_TYPES.include?(@notification.type)
|
||||||
return false if override_for_sender?
|
return false if override_for_sender?
|
||||||
|
|
||||||
from_limited? ||
|
from_limited? ||
|
||||||
|
|
Loading…
Reference in a new issue