|
|
|
@ -6,7 +6,7 @@ import (
|
|
|
|
|
"Open_IM/pkg/common/db"
|
|
|
|
|
"Open_IM/pkg/common/log"
|
|
|
|
|
"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"
|
|
|
|
|
"Open_IM/pkg/utils"
|
|
|
|
|
"context"
|
|
|
|
@ -33,14 +33,14 @@ func TagSendMessage(operationID string, user *db.User, recvID, content string, s
|
|
|
|
|
msgData.SenderPlatformID = senderPlatformID
|
|
|
|
|
req.MsgData = &msgData
|
|
|
|
|
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 {
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
client := pbChat.NewChatClient(etcdConn)
|
|
|
|
|
client := pbChat.NewMsgClient(etcdConn)
|
|
|
|
|
respPb, err := client.SendMsg(context.Background(), &req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.NewError(operationID, utils.GetSelfFuncName(), "send msg failed", err.Error())
|
|
|
|
|