mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-03 08:35:43 +02:00
Skip CLI session expired notifcation if notifications are disabled (#3266)
This commit is contained in:
parent
631ef4ed28
commit
d7d5b1b1d6
@ -766,10 +766,11 @@ func (s *Server) GetConfig(_ context.Context, _ *proto.GetConfigRequest) (*proto
|
|||||||
DisableNotifications: s.config.DisableNotifications,
|
DisableNotifications: s.config.DisableNotifications,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) onSessionExpire() {
|
func (s *Server) onSessionExpire() {
|
||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
isUIActive := internal.CheckUIApp()
|
isUIActive := internal.CheckUIApp()
|
||||||
if !isUIActive {
|
if !isUIActive && !s.config.DisableNotifications {
|
||||||
if err := sendTerminalNotification(); err != nil {
|
if err := sendTerminalNotification(); err != nil {
|
||||||
log.Errorf("send session expire terminal notification: %v", err)
|
log.Errorf("send session expire terminal notification: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user