Only check for Problem types in user filers for Recovery/Acknowledgement notifications

refs #6047
This commit is contained in:
Michael Friedrich 2018-09-12 17:04:11 +02:00
parent 834e37d3e2
commit af1f2e0c55
1 changed files with 6 additions and 4 deletions

View File

@ -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;
}
}