mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-23 08:51:29 +02:00
[client] Revert silent deadline-rejected event; restore userMessage
MetaSessionDeadlineRejected had no UI consumer: the tray only does metadata-driven localisation for MetaSessionWarning events; all other SystemEvents display userMessage directly (tray_events.go). Leaving userMessage empty made the rejection invisible to the user. Restore the English userMessage so the generic event path shows something, and remove the unused MetaSessionDeadlineRejected constant. https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u
This commit is contained in:
@@ -33,13 +33,6 @@ const (
|
||||
// for the T-10 event, FinalWarningLead for the T-2 event) so the UI
|
||||
// can show "expires in ~N minutes" without hardcoding either constant.
|
||||
MetaSessionLeadMinutes = "lead_minutes"
|
||||
// MetaSessionDeadlineRejected is set to the rejection reason when the
|
||||
// daemon discards a deadline received from the management server (e.g.
|
||||
// pre-epoch, too far in the future, or past the clock-skew tolerance).
|
||||
// The UI uses this key to detect the event and display a localized
|
||||
// message; userMessage is intentionally left empty for the same reason
|
||||
// as the warning events above.
|
||||
MetaSessionDeadlineRejected = "session_deadline_rejected"
|
||||
)
|
||||
|
||||
// expiresAtLayout is the wire format used for MetaSessionExpiresAt.
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
cProto "github.com/netbirdio/netbird/client/proto"
|
||||
"github.com/netbirdio/netbird/client/internal/auth/sessionwatch"
|
||||
"github.com/netbirdio/netbird/client/system"
|
||||
)
|
||||
|
||||
@@ -57,8 +56,8 @@ func (e *Engine) ApplySessionDeadline(ts *timestamppb.Timestamp) {
|
||||
cProto.SystemEvent_ERROR,
|
||||
cProto.SystemEvent_AUTHENTICATION,
|
||||
"session deadline rejected",
|
||||
"",
|
||||
map[string]string{sessionwatch.MetaSessionDeadlineRejected: err.Error()},
|
||||
"The session expiry time from the server could not be applied. Re-login may be required.",
|
||||
map[string]string{"reason": err.Error()},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user