Skip CLI session expired notifcation if notifications are disabled (#3266)

This commit is contained in:
Viktor Liu 2025-02-20 15:01:53 +01:00 committed by GitHub
parent 631ef4ed28
commit d7d5b1b1d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
}