verify: accept event to be verified as json argument.

This commit is contained in:
fiatjaf 2024-02-12 15:38:43 -03:00
parent e89823b10e
commit 347a82eaa9
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -15,7 +15,7 @@ var verify = &cli.Command{
it outputs nothing if the verification is successful.`,
Action: func(c *cli.Context) error {
for stdinEvent := range getStdinLinesOrBlank() {
for stdinEvent := range getStdinLinesOrFirstArgument(c.Args().First()) {
evt := nostr.Event{}
if stdinEvent != "" {
if err := json.Unmarshal([]byte(stdinEvent), &evt); err != nil {