From: Michael Friedrich Date: Wed, 12 Sep 2018 15:04:11 +0000 (+0200) Subject: Only check for Problem types in user filers for Recovery/Acknowledgement notifications X-Git-Tag: v2.10.0~34^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af1f2e0c55eabc14c34b26a5195e7ae13fdf00cc;p=icinga2 Only check for Problem types in user filers for Recovery/Acknowledgement notifications refs #6047 --- diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp index 6da7f428f..9ac006e1e 100644 --- a/lib/icinga/notification.cpp +++ b/lib/icinga/notification.cpp @@ -402,18 +402,20 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe /* on recovery, check if user was notified before */ if (type == NotificationRecovery) { - if (!notifiedProblemUsers->Contains(userName) && CheckNotificationUserFilters(NotificationProblem, user, false, false)) { + if (!notifiedProblemUsers->Contains(userName) && (NotificationProblem & user->GetTypeFilter())) { Log(LogNotice, "Notification") - << "We did not notify user '" << userName << "' for a problem before. Not sending recovery notification."; + << "We did not notify user '" << userName + << "' (Problem types enabled) for a problem before. Not sending recovery notification."; continue; } } /* on acknowledgement, check if user was notified before */ if (type == NotificationAcknowledgement) { - if (!notifiedProblemUsers->Contains(userName) && CheckNotificationUserFilters(NotificationProblem, user, false, false)) { + if (!notifiedProblemUsers->Contains(userName) && (NotificationProblem & user->GetTypeFilter())) { Log(LogNotice, "Notification") - << "We did not notify user '" << userName << "' for a problem before. Not sending acknowledgement notification."; + << "We did not notify user '" << userName + << "' (Problem types enabled) for a problem before. Not sending acknowledgement notification."; continue; } }