From b8d3bcad6a9d4ed759de7622ba1f91b30cbbb7d0 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 22 Aug 2016 10:47:09 +0200 Subject: [PATCH] Cluster: Fix notified users for NotificationSentToAllUsers event refs #12449 refs #12444 --- lib/icinga/clusterevents.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/icinga/clusterevents.cpp b/lib/icinga/clusterevents.cpp index d14b755dd..1898cd844 100644 --- a/lib/icinga/clusterevents.cpp +++ b/lib/icinga/clusterevents.cpp @@ -957,7 +957,11 @@ void ClusterEvents::NotificationSentToAllUsersHandler(const Notification::Ptr& n params->Set("service", service->GetShortName()); params->Set("notification", notification->GetName()); - params->Set("users", Array::FromSet(users)); + Array::Ptr ausers = new Array(); + BOOST_FOREACH(const User::Ptr& user, users) { + ausers->Add(user->GetName()); + } + params->Set("users", ausers); params->Set("type", notificationType); params->Set("cr", Serialize(cr)); @@ -1053,7 +1057,13 @@ Value ClusterEvents::NotificationSentToAllUsersAPIHandler(const MessageOrigin::P notification->SetNotificationNumber(params->Get("notification_number")); notification->SetLastProblemNotification(params->Get("last_problem_notification")); notification->SetNoMoreNotifications(params->Get("no_more_notifications")); - notification->SetNotifiedUsers(Array::FromSet(users)); + + Array::Ptr notifiedUsers = new Array(); + BOOST_FOREACH(const User::Ptr& user, users) { + notifiedUsers->Add(user->GetName()); + } + + notification->SetNotifiedUsers(notifiedUsers); Checkable::OnNotificationSentToAllUsers(notification, checkable, users, type, cr, author, text, origin); -- 2.40.0