From a9d06b883fe742c5dd03b822ba2385203e1b1682 Mon Sep 17 00:00:00 2001 From: Pascal Fischer <32096965+pascal-fischer@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:09:08 +0100 Subject: [PATCH] add all group to add peer affected peers network map check (#2830) --- management/server/peer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/management/server/peer.go b/management/server/peer.go index 96ede1511..7cc2209c5 100644 --- a/management/server/peer.go +++ b/management/server/peer.go @@ -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) }