eventstore: fix maxLimit handling when filter.Limit is unset.
This commit is contained in:
@@ -12,8 +12,6 @@ import (
|
||||
var serialDelete uint32 = 0
|
||||
|
||||
func (b *BadgerBackend) DeleteEvent(id nostr.ID) error {
|
||||
fmt.Println("...", id)
|
||||
|
||||
deletionHappened := false
|
||||
|
||||
err := b.Update(func(txn *badger.Txn) error {
|
||||
|
||||
@@ -28,7 +28,7 @@ func (b *BadgerBackend) QueryEvents(filter nostr.Filter, maxLimit int) iter.Seq[
|
||||
} else if tlimit < maxLimit {
|
||||
maxLimit = tlimit
|
||||
}
|
||||
if filter.Limit < maxLimit {
|
||||
if filter.Limit > 0 && filter.Limit < maxLimit {
|
||||
maxLimit = filter.Limit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user