eventstore: QueryEvents() to take a maxLimit param now so everything is clearer.

This commit is contained in:
fiatjaf
2025-05-11 09:36:59 -03:00
parent 9118217048
commit f60fc08f8d
40 changed files with 108 additions and 151 deletions
+6
View File
@@ -3,6 +3,7 @@ package wrappers
import (
"context"
"fmt"
"iter"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/eventstore"
@@ -12,6 +13,11 @@ var _ nostr.Publisher = StorePublisher{}
type StorePublisher struct {
eventstore.Store
MaxLimit int
}
func (w StorePublisher) QueryEvents(filter nostr.Filter) iter.Seq[nostr.Event] {
return w.Store.QueryEvents(filter, w.MaxLimit)
}
func (w StorePublisher) Publish(ctx context.Context, evt nostr.Event) error {