From c5e7028e21c54b500f5152f4e82a763b53314ac6 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Sat, 9 Dec 2023 18:03:45 +0800 Subject: [PATCH] update --- internal/logic/app/group_app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/logic/app/group_app.go b/internal/logic/app/group_app.go index 05fd772..cf53ec5 100644 --- a/internal/logic/app/group_app.go +++ b/internal/logic/app/group_app.go @@ -143,8 +143,8 @@ func (*groupApp) AddMembers(ctx context.Context, userId, groupId int64, userIds if err != nil { return nil, err } - if imPackage.GroupNum <= int64(group.UserNum) { - return nil, errors.New("群人员数量已满!") + if imPackage.GroupNum <= int64(group.UserNum)+int64(len(userIds)) { + return nil, errors.New("群人员数量已满!") } existIds, addedIds, err := group.AddMembers(ctx, userIds)