You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/internal/msg_gateway/gate/batch_push.go

36 lines
1.2 KiB

2 years ago
package gate
import (
sdk_ws "Open_IM/pkg/proto/sdk_ws"
)
var MaxPullMsgNum = 100
func (r *RPCServer) GenPullSeqList(currentSeq uint32, operationID string, userID string) ([]uint32, error) {
2 years ago
return nil, nil
2 years ago
}
func (r *RPCServer) GetSingleMsgForPush(operationID string, msgData *sdk_ws.MsgData, pushToUserID string, platformID string) []*sdk_ws.MsgData {
2 years ago
//seqList, err := r.GenPullSeqList(msgData.Seq, operationID, pushToUserID)
//if err != nil {
// return nil
//}
//rpcReq := sdk_ws.PullMessageBySeqListReq{}
//rpcReq.SeqList = seqList
//rpcReq.UserID = pushToUserID
//rpcReq.OperationID = operationID
//grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
//msgClient := pbChat.NewChatClient(grpcConn)
//reply, err := msgClient.PullMessageBySeqList(context.Background(), &rpcReq)
2 years ago
return nil
}
func (r *RPCServer) GetBatchMsgForPush(operationID string, msgData *sdk_ws.MsgData, pushToUserIDList []string, platformID string) map[string][]*sdk_ws.MsgData {
return nil
}
func (r *RPCServer) GetMaxSeq(userID string) (uint32, error) {
return 0, nil
}