More changes
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 26s

This commit is contained in:
2025-06-01 12:31:32 -04:00
parent 8cb2ae8835
commit cec922f363

View File

@ -240,11 +240,12 @@ func New(config *config.Config) (*Client, error) {
}
// client.logger.Debug("unmarshaled json data", "request", "auth", "type", "sessionData", "body", sd)
if client.isRegistered {
client.logger.Debug("Client authentication successful", "isRegistered", sd.DeviceRegistered)
if sd.DeviceRegistered && sd.RegisteredDevicePermanent {
client.logger.Debug("client authentication successful")
client.isAuthenticated = true
client.isRegistered = sd.DeviceRegistered
client.isRegistered = true
} else {
client.logger.Debug("client authentication successful, but devices is not registered")
client.registerDevice()
}