fix: fetch message return isEnd and endSeq panic. (#2959)

* fix: server can return isEnd to control fetch messages when sdk pull messages end normally.

* fix: server can return isEnd to control fetch messages when sdk pull messages end normally.

* fix: server can return isEnd to control fetch messages when sdk pull messages end normally.
pull/2969/head
OpenIM-Gordon 9 months ago committed by GitHub
parent 97f506c366
commit 1eaae5f980
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -97,8 +97,6 @@ func (m *msgServer) GetSeqMessage(ctx context.Context, req *msg.GetSeqMessageReq
return nil, err
}
var pullMsgs *sdkws.PullMsgs
pullMsgs.IsEnd = isEnd
pullMsgs.EndSeq = endSeq
if ok := false; conversationutil.IsNotificationConversationID(conv.ConversationID) {
pullMsgs, ok = resp.NotificationMsgs[conv.ConversationID]
if !ok {
@ -113,6 +111,8 @@ func (m *msgServer) GetSeqMessage(ctx context.Context, req *msg.GetSeqMessageReq
}
}
pullMsgs.Msgs = append(pullMsgs.Msgs, msgs...)
pullMsgs.IsEnd = isEnd
pullMsgs.EndSeq = endSeq
}
return resp, nil
}

Loading…
Cancel
Save