Skip to content

Commit

Permalink
add wrappers/disablesearch
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Aug 3, 2024
1 parent e3b427d commit c30ee92
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions wrappers/disablesearch/disablesearch.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package disablesearch

import (
"context"

"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
)

type Wrapper struct {
eventstore.Store
}

var _ eventstore.Store = (*Wrapper)(nil)

func (w Wrapper) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error) {
if filter.Search != "" {
return nil, nil
}
return w.Store.QueryEvents(ctx, filter)
}

0 comments on commit c30ee92

Please sign in to comment.