]> granicus.if.org Git - icinga2/commitdiff
Still notify on acknowledgement and recovery if user does not get problem notificatio...
authorNoah Hilverling <noah@hilverling.com>
Tue, 4 Sep 2018 11:11:28 +0000 (13:11 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 12 Sep 2018 12:54:45 +0000 (14:54 +0200)
refs #6047

lib/icinga/notification.cpp

index 85ca54da7c5072a5774847bad95f4787546a752e..6da7f428fd3730d5d80286ec5aead115453728f2 100644 (file)
@@ -402,7 +402,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 
                /* on recovery, check if user was notified before */
                if (type == NotificationRecovery) {
-                       if (!notifiedProblemUsers->Contains(userName)) {
+                       if (!notifiedProblemUsers->Contains(userName) && CheckNotificationUserFilters(NotificationProblem, user, false, false)) {
                                Log(LogNotice, "Notification")
                                        << "We did not notify user '" << userName << "' for a problem before. Not sending recovery notification.";
                                continue;
@@ -411,7 +411,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 
                /* on acknowledgement, check if user was notified before */
                if (type == NotificationAcknowledgement) {
-                       if (!notifiedProblemUsers->Contains(userName)) {
+                       if (!notifiedProblemUsers->Contains(userName) && CheckNotificationUserFilters(NotificationProblem, user, false, false)) {
                                Log(LogNotice, "Notification")
                                                << "We did not notify user '" << userName << "' for a problem before. Not sending acknowledgement notification.";
                                continue;