From 8a696da7aeda8a100e63f760d1e7bedbcd361c33 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Fri, 29 Aug 2025 12:47:15 +0000 Subject: [PATCH] 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. --- internal/alerts/alerts.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/alerts/alerts.go b/internal/alerts/alerts.go index 6b6be01e4..4512af535 100644 --- a/internal/alerts/alerts.go +++ b/internal/alerts/alerts.go @@ -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 }