mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 22:39:18 +08:00
fix: server can return isEnd to control fetch messages when sdk pull messages end normally. (#2949)
This commit is contained in:
committed by
OpenIM-Robot
parent
7f471c44bf
commit
3c6fbabded
@@ -92,11 +92,13 @@ func (m *msgServer) GetSeqMessage(ctx context.Context, req *msg.GetSeqMessageReq
|
||||
NotificationMsgs: make(map[string]*sdkws.PullMsgs),
|
||||
}
|
||||
for _, conv := range req.Conversations {
|
||||
_, _, msgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, req.UserID, conv.ConversationID, conv.Seqs)
|
||||
isEnd, endSeq, msgs, err := m.MsgDatabase.GetMessagesBySeqWithBounds(ctx, req.UserID, conv.ConversationID, conv.Seqs, req.GetOrder())
|
||||
if err != nil {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user