Skip to content

Commit

Permalink
fix: fetch message return isEnd and endSeq panic. (#2959)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
FGadvancer authored Dec 12, 2024
1 parent 97f506c commit 1eaae5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/rpc/msg/sync_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
Expand Down

0 comments on commit 1eaae5f

Please # to comment.