mirror of https://github.com/Icinga/icinga2.git
Icinga DB: Write IDs of notified users into notification history stream
This commit is contained in:
parent
95cdc00ad4
commit
81e5feeb08
|
@ -1672,6 +1672,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