mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Merge pull request #9001 from Icinga/feature/icingadb-add-user-ids-to-notification-history
Icinga DB: Write IDs of notified users into notification history stream
This commit is contained in:
commit
ed50a9d529
@ -1675,6 +1675,15 @@ void IcingaDB::SendSentNotification(
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
if (!users.empty()) {
|
||||
Array::Ptr users_notified = new Array();
|
||||
for (const User::Ptr& user : users) {
|
||||
users_notified->Add(GetObjectIdentifier(user));
|
||||
}
|
||||
xAdd.emplace_back("users_notified_ids");
|
||||
xAdd.emplace_back(JsonEncode(users_notified));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
|
||||
|
||||
for (const User::Ptr& user : users) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user