fix: alert acknowledgment not persisting - map update was missing

The AcknowledgeAlert function was modifying the alert pointer but not writing
it back to the activeAlerts map. Since Go maps store values (not references),
the acknowledged state wasn't being persisted. Fixed by adding the map update
after modifying the alert properties.
This commit is contained in:
Pulse Monitor
2025-08-29 12:47:15 +00:00
parent 3c40d9fd3c
commit 8a696da7ae
+3
View File
@@ -933,6 +933,9 @@ func (m *Manager) AcknowledgeAlert(alertID, user string) error {
now := time.Now()
alert.AckTime = &now
alert.AckUser = user
// Write the modified alert back to the map
m.activeAlerts[alertID] = alert
return nil
}