From 27fd084cb5ccb4bf6b2a3eb28b0b123063230c10 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 13 Mar 2024 11:17:55 +0100 Subject: [PATCH] Exempt some notification types from notification filtering (#29565) --- app/services/notify_service.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index 428fdb4d47c..66cbff0ef8e 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -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? ||