[management] Add missing parentheses on iphone hostname generation condition (#2977)

This commit is contained in:
Joakim Nohlgård 2024-12-03 13:49:02 +01:00 committed by GitHub
parent 6285e0d23e
commit 7dacd9cb23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -477,7 +477,7 @@ func (am *DefaultAccountManager) AddPeer(ctx context.Context, setupKey, userID s
setupKeyName = sk.Name
}
if strings.ToLower(peer.Meta.Hostname) == "iphone" || strings.ToLower(peer.Meta.Hostname) == "ipad" && userID != "" {
if (strings.ToLower(peer.Meta.Hostname) == "iphone" || strings.ToLower(peer.Meta.Hostname) == "ipad") && userID != "" {
if am.idpManager != nil {
userdata, err := am.idpManager.GetUserDataByID(ctx, userID, idp.AppMetadata{WTAccountID: accountID})
if err == nil && userdata != nil {