Explorar el Código

update

master
DengBiao hace 1 año
padre
commit
4b8f86112c
Se han modificado 1 ficheros con 10 adiciones y 3 borrados
  1. +10
    -3
      internal/logic/app/group_app.go

+ 10
- 3
internal/logic/app/group_app.go Ver fichero

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


Cargando…
Cancelar
Guardar