eventstore: QueryEvents() to take a maxLimit param now so everything is clearer.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user