mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 08:44:07 +01:00
add all group to add peer affected peers network map check (#2830)
This commit is contained in:
parent
5f06b202c3
commit
a9d06b883f
@ -589,6 +589,12 @@ func (am *DefaultAccountManager) AddPeer(ctx context.Context, setupKey, userID s
|
|||||||
return nil, nil, nil, fmt.Errorf("error getting account: %w", err)
|
return nil, nil, nil, fmt.Errorf("error getting account: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allGroup, err := account.GetGroupAll()
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, nil, fmt.Errorf("error getting all group ID: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
groupsToAdd = append(groupsToAdd, allGroup.ID)
|
||||||
if areGroupChangesAffectPeers(account, groupsToAdd) {
|
if areGroupChangesAffectPeers(account, groupsToAdd) {
|
||||||
am.updateAccountPeers(ctx, account)
|
am.updateAccountPeers(ctx, account)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user