diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index 48cf890f5..2ae987b3d 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -457,7 +457,7 @@ func (db *commonMsgDatabase) GetMsgBySeqsRange(ctx context.Context, userID strin if err != nil && errs.Unwrap(err) != redis.Nil { return 0, 0, nil, err } - if userMinSeq < minSeq { + if userMinSeq > minSeq { minSeq = userMinSeq } if minSeq > end {