diff --git a/validate.go b/validate.go index 57f6aef..8b966dc 100644 --- a/validate.go +++ b/validate.go @@ -51,7 +51,8 @@ nak event -k 1 -p not_a_pubkey | nak validate } for stdinEvent := range getJsonsOrBlank() { - if stdinEvent == "" { + if stdinEvent == "{}" && !isPiped() { + // blank sentinel from getJsonsOrBlank(), use the arguments instead for _, arg := range c.Args().Slice() { if err := handleEvent(arg); err != nil { ctx = lineProcessingError(ctx, "%s", err) diff --git a/verify.go b/verify.go index aa8efc8..27cf2a2 100644 --- a/verify.go +++ b/verify.go @@ -19,7 +19,8 @@ it outputs nothing if the verification is successful.`, Action: func(ctx context.Context, c *cli.Command) error { for stdinEvent := range getJsonsOrBlank() { evt := nostr.Event{} - if stdinEvent == "" { + if stdinEvent == "{}" && !isPiped() { + // blank sentinel from getJsonsOrBlank(), use the argument instead stdinEvent = c.Args().First() if stdinEvent == "" { continue