invalidated filters just return nothing instead of erroring.

This commit is contained in:
fiatjaf
2024-01-05 20:48:44 -03:00
parent 40c3dbdc76
commit 8d0afc1f12

View File

@@ -18,7 +18,9 @@ func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGr
} }
if filter.Limit < 0 { if filter.Limit < 0 {
return errors.New("blocked: filter invalidated") // this is a special situation through which the implementor signals to us that it doesn't want
// to event perform any queries whatsoever
return nil
} }
// then check if we'll reject this filter (we apply this after overwriting // then check if we'll reject this filter (we apply this after overwriting