mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 11:13:26 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user