From 6d23509d8c0fc4af34ad444cd2a3d0ef2b10af3f Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 25 Aug 2024 17:09:42 -0300 Subject: [PATCH] fetch: handle note1 case. --- fetch.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fetch.go b/fetch.go index dbb0938..4343106 100644 --- a/fetch.go +++ b/fetch.go @@ -2,6 +2,7 @@ package main import ( "context" + "fmt" "github.com/fiatjaf/cli/v3" "github.com/nbd-wtf/go-nostr" @@ -68,6 +69,8 @@ var fetch = &cli.Command{ authorHint = v.Author } relays = append(relays, v.Relays...) + case "note": + filter.IDs = append(filter.IDs, value.(string)) case "naddr": v := value.(nostr.EntityPointer) filter.Tags = nostr.TagMap{"d": []string{v.Identifier}} @@ -83,6 +86,8 @@ var fetch = &cli.Command{ v := value.(string) filter.Authors = append(filter.Authors, v) authorHint = v + default: + return fmt.Errorf("unexpected prefix %s", prefix) } }