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.
This commit is contained in:
Lez
2025-11-18 08:49:23 +01:00
committed by fiatjaf_
parent ea4ad84aa0
commit bbe1661096

View File

@@ -75,7 +75,7 @@ func getJsonsOrBlank() iter.Seq[string] {
return true
})
if !hasStdin {
if !hasStdin && !isPiped() {
yield("{}")
}