From 52cd98b3b3a524d00f3efd36fac5231ac6d1c94c Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 12 Nov 2023 09:30:25 -0300 Subject: [PATCH] if none of the authors in a query (that have authors) are irrelevant, invalidate the query. --- relay.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/relay.go b/relay.go index 062c941..0537767 100644 --- a/relay.go +++ b/relay.go @@ -78,5 +78,9 @@ func removeAuthorsNotWhitelisted(ctx context.Context, filter *nostr.Filter) { } } filter.Authors = newAuthors + + if len(newAuthors) == 0 { + filter.Limit = 0 + } } }