Skip to content

Commit

Permalink
fetch: handle note1 case.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Aug 25, 2024
1 parent 29b6ecb commit 6d23509
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"fmt"

"github.com/fiatjaf/cli/v3"
"github.com/nbd-wtf/go-nostr"
Expand Down Expand Up @@ -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}}
Expand All @@ -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)
}
}

Expand Down

0 comments on commit 6d23509

Please sign in to comment.