From bbe1661096962ed90bd63b40a362dc45d6223b7e Mon Sep 17 00:00:00 2001 From: Lez Date: Tue, 18 Nov 2025 08:49:23 +0100 Subject: [PATCH] Don't emit hello event if no events were received from stdin When running `nak req ... relay.one | nak event relay.two`, if the first req doesn't return any events, the second nak should not publish a "hello from nostr army knife" note to the second relay as it is clearly not the intention. `nak event relay.two` behavior is unchanged, it will publish the hello. --- helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index 68e3c72..c59aa2d 100644 --- a/helpers.go +++ b/helpers.go @@ -75,7 +75,7 @@ func getJsonsOrBlank() iter.Seq[string] { return true }) - if !hasStdin { + if !hasStdin && !isPiped() { yield("{}") }