fetch: fix handling of --relay tags.

This commit is contained in:
fiatjaf 2023-11-15 09:48:57 -03:00
parent 8fbfdc65c8
commit 15217f2466
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -46,20 +46,20 @@ var fetch = &cli.Command{
if v.Author != "" {
authorHint = v.Author
}
relays = v.Relays
relays = append(relays, v.Relays...)
case "naddr":
v := value.(nostr.EntityPointer)
filter.Tags = nostr.TagMap{"d": []string{v.Identifier}}
filter.Kinds = append(filter.Kinds, v.Kind)
filter.Authors = append(filter.Authors, v.PublicKey)
authorHint = v.PublicKey
relays = v.Relays
relays = append(relays, v.Relays...)
case "nprofile":
v := value.(nostr.ProfilePointer)
filter.Authors = append(filter.Authors, v.PublicKey)
filter.Kinds = append(filter.Kinds, 0)
authorHint = v.PublicKey
relays = v.Relays
relays = append(relays, v.Relays...)
case "npub":
v := value.(string)
filter.Authors = append(filter.Authors, v)