diff --git a/client/ui/services/daemon_feed.go b/client/ui/services/daemon_feed.go index 03836bdbb..632581fe9 100644 --- a/client/ui/services/daemon_feed.go +++ b/client/ui/services/daemon_feed.go @@ -46,6 +46,10 @@ const ( StatusNeedsLogin = "NeedsLogin" StatusLoginFailed = "LoginFailed" StatusSessionExpired = "SessionExpired" + + // SeverityCritical is the lower-cased proto SystemEvent_CRITICAL severity, as + // emitted by systemEventFromProto. Critical events bypass the notifications gate. + SeverityCritical = "critical" ) // Emitter sends a named payload to the frontend. Satisfied by Wails app.Event. diff --git a/client/ui/tray_events.go b/client/ui/tray_events.go index 8172e7060..12da68a5c 100644 --- a/client/ui/tray_events.go +++ b/client/ui/tray_events.go @@ -53,7 +53,7 @@ func (t *Tray) onSystemEvent(ev *application.CustomEvent) { return } - critical := strings.EqualFold(se.Severity, "critical") + critical := strings.EqualFold(se.Severity, services.SeverityCritical) t.profileMu.Lock() enabled := t.notificationsEnabled t.profileMu.Unlock()