mirror of https://github.com/Icinga/icinga2.git
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));
|
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);
|
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
|
||||||
|
|
||||||
for (const User::Ptr& user : users) {
|
for (const User::Ptr& user : users) {
|
||||||
|
|
Loading…
Reference in New Issue