diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f8b988337ddec616df0da2f3d4f30fd97e85e71..2f7c5bbc9e05274b8336b65ea75428ad9ce82c55 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 5935c174fc77c54b3f53110dd5ffe80498f5ab24..4cac3a6a63567ed6ac11aa51c0016bfaae0611c0 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 e7f579bb61eefe556d2944d37f4137503ed89a28..e71c5b1d75a986f014c7f8b0bacf8ac6ae2d5208 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)