Add GroupMinimum to the SetupKey response

This commit is contained in:
braginini
2022-09-12 14:30:46 +02:00
parent be7d829858
commit 03d0f62ccd
5 changed files with 38 additions and 10 deletions
+8
View File
@@ -344,6 +344,14 @@ func peerIPsToKeys(account *server.Account, peerIPs *[]string) []string {
return mappedPeerKeys
}
func toGroupMinimumResponse(group *server.Group) *api.GroupMinimum {
return &api.GroupMinimum{
Id: group.ID,
Name: group.Name,
PeersCount: len(group.Peers),
}
}
func toGroupResponse(account *server.Account, group *server.Group) *api.Group {
cache := make(map[string]api.PeerMinimum)
gr := api.Group{