|
|
@ -15,7 +15,7 @@ func (m *msgServer) PullMessageBySeqs(ctx context.Context, req *sdkws.PullMessag
|
|
|
|
resp.NotificationMsgs = make(map[string]*sdkws.PullMsgs)
|
|
|
|
resp.NotificationMsgs = make(map[string]*sdkws.PullMsgs)
|
|
|
|
for _, seq := range req.SeqRanges {
|
|
|
|
for _, seq := range req.SeqRanges {
|
|
|
|
if !utils.IsNotification(seq.ConversationID) {
|
|
|
|
if !utils.IsNotification(seq.ConversationID) {
|
|
|
|
_, msgs, err := m.MsgDatabase.GetMsgBySeqsRange(ctx, req.UserID, seq.ConversationID, seq.Begin, seq.End, seq.Num)
|
|
|
|
minSeq, msgs, err := m.MsgDatabase.GetMsgBySeqsRange(ctx, req.UserID, seq.ConversationID, seq.Begin, seq.End, seq.Num)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.ZWarn(ctx, "GetMsgBySeqsRange error", err, "conversationID", seq.ConversationID, "seq", seq)
|
|
|
|
log.ZWarn(ctx, "GetMsgBySeqsRange error", err, "conversationID", seq.ConversationID, "seq", seq)
|
|
|
|
continue
|
|
|
|
continue
|
|
|
@ -26,7 +26,7 @@ func (m *msgServer) PullMessageBySeqs(ctx context.Context, req *sdkws.PullMessag
|
|
|
|
for i := seq.Begin; i <= seq.End; i++ {
|
|
|
|
for i := seq.Begin; i <= seq.End; i++ {
|
|
|
|
seqs = append(seqs, i)
|
|
|
|
seqs = append(seqs, i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_, notificationMsgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, req.UserID, seq.ConversationID, seqs)
|
|
|
|
minSeq, notificationMsgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, req.UserID, seq.ConversationID, seqs)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.ZWarn(ctx, "GetMsgBySeqs error", err, "conversationID", seq.ConversationID, "seq", seq)
|
|
|
|
log.ZWarn(ctx, "GetMsgBySeqs error", err, "conversationID", seq.ConversationID, "seq", seq)
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|