From d7d5b1b1d608ac7a072bc7106f8b6dc27c80d9e6 Mon Sep 17 00:00:00 2001 From: Viktor Liu <17948409+lixmal@users.noreply.github.com> Date: Thu, 20 Feb 2025 15:01:53 +0100 Subject: [PATCH] Skip CLI session expired notifcation if notifications are disabled (#3266) --- client/server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/server/server.go b/client/server/server.go index e4e2c8f6f..2efbb94ff 100644 --- a/client/server/server.go +++ b/client/server/server.go @@ -766,10 +766,11 @@ func (s *Server) GetConfig(_ context.Context, _ *proto.GetConfigRequest) (*proto DisableNotifications: s.config.DisableNotifications, }, nil } + func (s *Server) onSessionExpire() { if runtime.GOOS != "windows" { isUIActive := internal.CheckUIApp() - if !isUIActive { + if !isUIActive && !s.config.DisableNotifications { if err := sendTerminalNotification(); err != nil { log.Errorf("send session expire terminal notification: %v", err) }