From f04387a9739375800aadf4d0bf571279760769b1 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 14 Dec 2020 13:28:53 +0100 Subject: [PATCH] FireSuppressedNotifications(const Notification::Ptr&): don't send notifications while suppressed by checkable ... e.g. if a notification enters its time period (not suppressed anymore), but its checkable has entered a downtime (suppressed). refs #8509 --- lib/notification/notificationcomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notification/notificationcomponent.cpp b/lib/notification/notificationcomponent.cpp index b81092ff1..6e4e99168 100644 --- a/lib/notification/notificationcomponent.cpp +++ b/lib/notification/notificationcomponent.cpp @@ -91,7 +91,7 @@ void FireSuppressedNotifications(const Notification::Ptr& notification) if ((!tp || tp->IsInside(Utility::GetTime())) && !checkable->IsLikelyToBeCheckedSoon()) { for (auto type : {NotificationProblem, NotificationRecovery, NotificationFlappingStart, NotificationFlappingEnd}) { - if (!(suppressedTypes & type)) + if (!(suppressedTypes & type) || checkable->NotificationReasonSuppressed(type)) continue; auto notificationName (notification->GetName());