| 2632 | } |
| 2633 | |
| 2634 | void IcingaDB::SendNotificationUsersChanged(const Notification::Ptr& notification, const Array::Ptr& oldValues, const Array::Ptr& newValues) { |
| 2635 | if (!m_RconWorker || !m_RconWorker->IsConnected() || oldValues == newValues) { |
| 2636 | return; |
| 2637 | } |
| 2638 | |
| 2639 | std::vector<Value> deletedUsers = GetArrayDeletedValues(oldValues, newValues); |
| 2640 | |
| 2641 | for (const auto& userName : deletedUsers) { |
| 2642 | String id = HashValue(new Array({m_EnvironmentId, "user", userName, notification->GetName()})); |
| 2643 | EnqueueRelationsDeletion(id,{ |
| 2644 | {CONFIG_REDIS_KEY_PREFIX "notification:user", ""}, |
| 2645 | {CONFIG_REDIS_KEY_PREFIX "notification:recipient", ""}, |
| 2646 | }); |
| 2647 | } |
| 2648 | } |
| 2649 | |
| 2650 | void IcingaDB::SendNotificationUserGroupsChanged(const Notification::Ptr& notification, const Array::Ptr& oldValues, const Array::Ptr& newValues) { |
| 2651 | if (!m_RconWorker || !m_RconWorker->IsConnected() || oldValues == newValues) { |
no test coverage detected