|
|
@ -372,7 +372,7 @@ func (db *commonMsgDatabase) getMsgBySeqsRange(ctx context.Context, userID strin
|
|
|
|
// This ensures that their message retrieval starts from the point they joined.
|
|
|
|
// This ensures that their message retrieval starts from the point they joined.
|
|
|
|
func (db *commonMsgDatabase) GetMsgBySeqsRange(ctx context.Context, userID string, conversationID string, begin, end, num, userMaxSeq int64) (int64, int64, []*sdkws.MsgData, error) {
|
|
|
|
func (db *commonMsgDatabase) GetMsgBySeqsRange(ctx context.Context, userID string, conversationID string, begin, end, num, userMaxSeq int64) (int64, int64, []*sdkws.MsgData, error) {
|
|
|
|
userMinSeq, err := db.seqUser.GetUserMinSeq(ctx, conversationID, userID)
|
|
|
|
userMinSeq, err := db.seqUser.GetUserMinSeq(ctx, conversationID, userID)
|
|
|
|
if err != nil && errors.Is(err, redis.Nil) {
|
|
|
|
if err != nil && !errors.Is(err, redis.Nil) {
|
|
|
|
return 0, 0, nil, err
|
|
|
|
return 0, 0, nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
minSeq, err := db.seqConversation.GetMinSeq(ctx, conversationID)
|
|
|
|
minSeq, err := db.seqConversation.GetMinSeq(ctx, conversationID)
|
|
|
|