mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-23 06:58:51 +00:00
spell: fix listing recent.
This commit is contained in:
4
spell.go
4
spell.go
@@ -54,6 +54,10 @@ var spell = &cli.Command{
|
|||||||
if c.Args().Len() == 0 {
|
if c.Args().Len() == 0 {
|
||||||
// check if we have input from stdin
|
// check if we have input from stdin
|
||||||
for stdinEvent := range getJsonsOrBlank() {
|
for stdinEvent := range getJsonsOrBlank() {
|
||||||
|
if stdinEvent == "{}" {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
var spell nostr.Event
|
var spell nostr.Event
|
||||||
if err := json.Unmarshal([]byte(stdinEvent), &spell); err != nil {
|
if err := json.Unmarshal([]byte(stdinEvent), &spell); err != nil {
|
||||||
return fmt.Errorf("failed to parse spell event from stdin: %w", err)
|
return fmt.Errorf("failed to parse spell event from stdin: %w", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user