Skip to content

Commit

Permalink
fix: change prometheus port.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Dec 5, 2023
1 parent 4461d91 commit 8c1633e
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions internal/msggateway/message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"sync"

"github.com/OpenIMSDK/protocol/msg"
"github.com/OpenIMSDK/tools/log"

"github.com/OpenIMSDK/protocol/push"
Expand Down Expand Up @@ -139,23 +138,23 @@ func (g GrpcHandler) GetSeq(context context.Context, data *Req) ([]byte, error)

func (g GrpcHandler) SendMessage(context context.Context, data *Req) ([]byte, error) {
log.ZWarn(context, "SendMessage for statistic", nil, "operationID", data.OperationID)
msgData := sdkws.MsgData{}
if err := proto.Unmarshal(data.Data, &msgData); err != nil {
return nil, err
}
if err := g.validate.Struct(&msgData); err != nil {
return nil, err
}
req := msg.SendMsgReq{MsgData: &msgData}
resp, err := g.msgRpcClient.SendMsg(context, &req)
if err != nil {
return nil, err
}
c, err := proto.Marshal(resp)
if err != nil {
return nil, err
}
return c, nil
//msgData := sdkws.MsgData{}
//if err := proto.Unmarshal(data.Data, &msgData); err != nil {
// return nil, err
//}
//if err := g.validate.Struct(&msgData); err != nil {
// return nil, err
//}
//req := msg.SendMsgReq{MsgData: &msgData}
//resp, err := g.msgRpcClient.SendMsg(context, &req)
//if err != nil {
// return nil, err
//}
//c, err := proto.Marshal(resp)
//if err != nil {
// return nil, err
//}
return nil, nil
}

func (g GrpcHandler) SendSignalMessage(context context.Context, data *Req) ([]byte, error) {
Expand Down

0 comments on commit 8c1633e

Please sign in to comment.