DengBiao pirms 1 gada
vecāks
revīzija
4b8f86112c
1 mainītis faili ar 10 papildinājumiem un 3 dzēšanām
  1. +10
    -3
      internal/logic/app/group_app.go

+ 10
- 3
internal/logic/app/group_app.go Parādīt failu

@@ -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


Notiek ielāde…
Atcelt
Saglabāt