add all group to add peer affected peers network map check (#2830)

This commit is contained in:
Pascal Fischer 2024-11-01 22:09:08 +01:00 committed by GitHub
parent 5f06b202c3
commit a9d06b883f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
} }