From b0893ca3a1641cc9dac8ce2458a7acc7af322286 Mon Sep 17 00:00:00 2001 From: Andrei Mihu Date: Tue, 6 Dec 2022 15:41:50 +0000 Subject: [PATCH] Update changelog. --- CHANGELOG.md | 2 ++ .../group/members/groupMembers.component.html | 2 +- server/console_group.go | 24 +++++++++++++++---- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f8b98833..2f7c5bbc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Add support for custom response headers set in server configuration. - Add missing fields to tournament end and reset JS runtime hooks. - Add support for removing channel messages to all runtimes. +- Allow devconsole group view to add new members. ### Changed - Stricter validation of limit in runtime storage list operations. @@ -30,6 +31,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - More graceful handling of no-op authoritative storage delete operations. - Ensure rank cache is correctly updated when joining tournaments. - Ensure default parameters for tournament listings are consistent between API and runtimes. +- Fix devconsole groups view incorrect visual removal of last group member. ## [3.14.0] - 2022-10-14 ### Added diff --git a/console/ui/src/app/group/members/groupMembers.component.html b/console/ui/src/app/group/members/groupMembers.component.html index 5935c174f..4cac3a6a6 100644 --- a/console/ui/src/app/group/members/groupMembers.component.html +++ b/console/ui/src/app/group/members/groupMembers.component.html @@ -18,7 +18,7 @@
- +
diff --git a/server/console_group.go b/server/console_group.go index e7f579bb6..e71c5b1d7 100644 --- a/server/console_group.go +++ b/server/console_group.go @@ -1,3 +1,17 @@ +// Copyright 2022 The Nakama Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package server import ( @@ -7,6 +21,10 @@ import ( "encoding/base64" "encoding/gob" "errors" + "strconv" + "strings" + "time" + "github.com/gofrs/uuid" "github.com/heroiclabs/nakama-common/api" "github.com/heroiclabs/nakama-common/rtapi" @@ -18,9 +36,6 @@ import ( "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/wrapperspb" - "strconv" - "strings" - "time" ) type consoleGroupCursor struct { @@ -539,9 +554,10 @@ func (s *ConsoleServer) AddGroupUsers(ctx context.Context, in *console.AddGroupU if err != nil { return nil, status.Error(codes.NotFound, "Invalid group ID format.") } - ids := strings.Split(in.Ids, ";") + ids := strings.Split(in.Ids, ",") uuids := make([]uuid.UUID, 0, len(ids)) for _, id := range ids { + id := strings.TrimSpace(id) uid, err := uuid.FromString(id) if err != nil { return nil, status.Error(codes.InvalidArgument, "Invalid user ID format: "+id) -- GitLab