diff --git a/khatru/responding.go b/khatru/responding.go index c33dff6..ec08602 100644 --- a/khatru/responding.go +++ b/khatru/responding.go @@ -12,11 +12,6 @@ import ( func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGroup, ws *WebSocket, filter nostr.Filter) error { defer eose.Done() - if filter.LimitZero { - // don't do any queries, just subscribe to future events - return nil - } - // then check if we'll reject this filter (we apply this after overwriting // because we may, for example, remove some things from the incoming filters // that we know we don't support, and then if the end result is an empty @@ -27,6 +22,11 @@ func (rl *Relay) handleRequest(ctx context.Context, id string, eose *sync.WaitGr } } + if filter.LimitZero { + // don't do any queries, just subscribe to future events + return nil + } + // run the function to query events if nil != rl.QueryStored { for event := range rl.QueryStored(ctx, filter) {