bring in khatru and eventstore.
This commit is contained in:
21
eventstore/wrappers/disablesearch/disablesearch.go
Normal file
21
eventstore/wrappers/disablesearch/disablesearch.go
Normal file
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user