From 4b8f86112c0d8541cd027ceb4c9e0b9d6eb25bee Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Wed, 19 Apr 2023 17:13:18 +0800 Subject: [PATCH] update --- internal/logic/app/group_app.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/internal/logic/app/group_app.go b/internal/logic/app/group_app.go index 6defd3d..02be240 100644 --- a/internal/logic/app/group_app.go +++ b/internal/logic/app/group_app.go @@ -10,6 +10,7 @@ import ( "gim/pkg/db" "gim/pkg/grpclib" "gim/pkg/pb" + "strings" ) type groupApp struct{} @@ -38,13 +39,19 @@ func (*groupApp) GetGroup(ctx context.Context, groupId int64) (*pb.Group, error) if err != nil { return nil, err } + masterId, err := grpclib.GetCtxMasterId(ctx) + if err != nil { + return nil, err + } userId, _, err := grpclib.GetCtxData(ctx) if err != nil { return nil, err } - for _, member := range group.Members { - if member.UserId == userId && member.MemberType != int(pb.MemberType_GMT_ADMIN) { - group.Name = "我的推荐人群" + if !strings.Contains(group.Name, "官方") && masterId == "68823769" { + for _, member := range group.Members { + if member.UserId == userId && member.MemberType != int(pb.MemberType_GMT_ADMIN) { + group.Name = "我的推荐人群" + } } } return group.ToProto(), nil