diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index bc2b03bb9..daf668ca5 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -417,7 +417,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 {