pull/455/head
skiffer-git 2 years ago committed by Xinwei Xiong(cubxxw-openim)
parent 5c405a9f3f
commit 69b805a537

@ -6,7 +6,7 @@ import (
"Open_IM/pkg/common/db" "Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3" "Open_IM/pkg/grpc-etcdv3/getcdv3"
pbChat "Open_IM/pkg/proto/chat" pbChat "Open_IM/pkg/proto/msg"
pbCommon "Open_IM/pkg/proto/sdk_ws" pbCommon "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
@ -33,14 +33,14 @@ func TagSendMessage(operationID string, user *db.User, recvID, content string, s
msgData.SenderPlatformID = senderPlatformID msgData.SenderPlatformID = senderPlatformID
req.MsgData = &msgData req.MsgData = &msgData
req.OperationID = operationID req.OperationID = operationID
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName, operationID) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, operationID)
if etcdConn == nil { if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil" errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg) log.NewError(req.OperationID, errMsg)
return return
} }
client := pbChat.NewChatClient(etcdConn) client := pbChat.NewMsgClient(etcdConn)
respPb, err := client.SendMsg(context.Background(), &req) respPb, err := client.SendMsg(context.Background(), &req)
if err != nil { if err != nil {
log.NewError(operationID, utils.GetSelfFuncName(), "send msg failed", err.Error()) log.NewError(operationID, utils.GetSelfFuncName(), "send msg failed", err.Error())

Loading…
Cancel
Save