Allow negentropy sync with broad filters
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:
@s.roertgen 2026-03-09 09:53:12 +01:00
commit ff85bd44e9

View file

@ -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,
)