mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-08 16:48:51 +00:00
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:
@@ -75,7 +75,7 @@ func getJsonsOrBlank() iter.Seq[string] {
|
||||
return true
|
||||
})
|
||||
|
||||
if !hasStdin {
|
||||
if !hasStdin && !isPiped() {
|
||||
yield("{}")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user