eventstore: fix maxLimit handling when filter.Limit is unset.

This commit is contained in:
fiatjaf
2025-05-12 06:12:58 -03:00
parent 9a0b263ecc
commit 65411a10c8
4 changed files with 3 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ func (b *LMDBBackend) QueryEvents(filter nostr.Filter, maxLimit int) iter.Seq[no
} else if tlimit < maxLimit {
maxLimit = tlimit
}
if filter.Limit < maxLimit {
if filter.Limit > 0 && filter.Limit < maxLimit {
maxLimit = filter.Limit
}