Allow negentropy sync with broad filters
All checks were successful
Build and Push Docker Image / build (push) Successful in 6m4s
All checks were successful
Build and Push Docker Image / build (push) Successful in 6m4s
NoEmptyFilters was blocking negentropy sessions that send filters without kinds/authors/ids. Skip the check for negentropy sessions so strfry and other tools can sync.
This commit is contained in:
parent
4723c34720
commit
ff85bd44e9
1 changed files with 6 additions and 1 deletions
7
main.go
7
main.go
|
|
@ -161,7 +161,12 @@ func main() {
|
|||
)
|
||||
|
||||
relay.OnRequest = policies.SeqRequest(
|
||||
policies.NoEmptyFilters,
|
||||
func(ctx context.Context, filter nostr.Filter) (reject bool, msg string) {
|
||||
if khatru.IsNegentropySession(ctx) {
|
||||
return false, ""
|
||||
}
|
||||
return policies.NoEmptyFilters(ctx, filter)
|
||||
},
|
||||
policies.NoComplexFilters,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue