diff --git a/cmd/Open-IM-SDK-Core b/cmd/Open-IM-SDK-Core index d471ef590..18c0a4485 160000 --- a/cmd/Open-IM-SDK-Core +++ b/cmd/Open-IM-SDK-Core @@ -1 +1 @@ -Subproject commit d471ef590b1c00c553821de715d23be03c0c8142 +Subproject commit 18c0a4485c8a3116bca4b782cc3879375d00d937 diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 650c5bbc5..50be90c0a 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -185,14 +185,14 @@ func ManagementSendMsg(c *gin.Context) { pbData := newUserSendMsgReq(¶ms) log.Info(params.OperationID, "", "api ManagementSendMsg call start..., [data: %s]", pbData.String()) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName, params.OperationID) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID) if etcdConn == nil { errMsg := params.OperationID + "getcdv3.GetConn == nil" log.NewError(params.OperationID, errMsg) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) return } - client := pbChat.NewChatClient(etcdConn) + client := pbChat.NewMsgClient(etcdConn) log.Info(params.OperationID, "", "api ManagementSendMsg call, api call rpc...") @@ -294,14 +294,14 @@ func ManagementBatchSendMsg(c *gin.Context) { pbData := newUserSendMsgReq(req) pbData.MsgData.RecvID = recvID log.Info(params.OperationID, "", "api ManagementSendMsg call start..., ", pbData.String()) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName, params.OperationID) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID) if etcdConn == nil { errMsg := params.OperationID + "getcdv3.GetConn == nil" log.NewError(params.OperationID, errMsg) resp.Data.FailedIDList = append(resp.Data.FailedIDList, recvID) continue } - client := pbChat.NewChatClient(etcdConn) + client := pbChat.NewMsgClient(etcdConn) rpcResp, err := client.SendMsg(context.Background(), pbData) if err != nil { log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) diff --git a/internal/api/manage/management_user.go b/internal/api/manage/management_user.go index 3d2c89a65..eb2985258 100644 --- a/internal/api/manage/management_user.go +++ b/internal/api/manage/management_user.go @@ -198,9 +198,9 @@ func GetUsersOnlineStatus(c *gin.Context) { var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult flag := false - grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) + grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName) for _, v := range grpcCons { - client := pbRelay.NewOnlineMessageRelayServiceClient(v) + client := pbRelay.NewRelayClient(v) reply, err := client.GetUsersOnlineStatus(context.Background(), req) if err != nil { log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error())