Icinga DB: Write IDs of notified users into notification history stream

This commit is contained in:
Julian Brost 2021-09-14 16:36:16 +02:00
parent 95cdc00ad4
commit 81e5feeb08
1 changed files with 9 additions and 0 deletions

View File

@ -1672,6 +1672,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) {