Skip to content

Commit

Permalink
add all group to add peer affected peers network map check (netbirdio…
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer authored Nov 1, 2024
1 parent 5f06b20 commit a9d06b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions management/server/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

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) {
am.updateAccountPeers(ctx, account)
}
Expand Down

0 comments on commit a9d06b8

Please sign in to comment.