mirror of
https://github.com/fiatjaf/nak.git
synced 2024-11-22 08:19:06 -05:00
fetch: fix handling of --relay tags.
This commit is contained in:
parent
8fbfdc65c8
commit
15217f2466
6
fetch.go
6
fetch.go
|
@ -46,20 +46,20 @@ var fetch = &cli.Command{
|
||||||
if v.Author != "" {
|
if v.Author != "" {
|
||||||
authorHint = v.Author
|
authorHint = v.Author
|
||||||
}
|
}
|
||||||
relays = v.Relays
|
relays = append(relays, v.Relays...)
|
||||||
case "naddr":
|
case "naddr":
|
||||||
v := value.(nostr.EntityPointer)
|
v := value.(nostr.EntityPointer)
|
||||||
filter.Tags = nostr.TagMap{"d": []string{v.Identifier}}
|
filter.Tags = nostr.TagMap{"d": []string{v.Identifier}}
|
||||||
filter.Kinds = append(filter.Kinds, v.Kind)
|
filter.Kinds = append(filter.Kinds, v.Kind)
|
||||||
filter.Authors = append(filter.Authors, v.PublicKey)
|
filter.Authors = append(filter.Authors, v.PublicKey)
|
||||||
authorHint = v.PublicKey
|
authorHint = v.PublicKey
|
||||||
relays = v.Relays
|
relays = append(relays, v.Relays...)
|
||||||
case "nprofile":
|
case "nprofile":
|
||||||
v := value.(nostr.ProfilePointer)
|
v := value.(nostr.ProfilePointer)
|
||||||
filter.Authors = append(filter.Authors, v.PublicKey)
|
filter.Authors = append(filter.Authors, v.PublicKey)
|
||||||
filter.Kinds = append(filter.Kinds, 0)
|
filter.Kinds = append(filter.Kinds, 0)
|
||||||
authorHint = v.PublicKey
|
authorHint = v.PublicKey
|
||||||
relays = v.Relays
|
relays = append(relays, v.Relays...)
|
||||||
case "npub":
|
case "npub":
|
||||||
v := value.(string)
|
v := value.(string)
|
||||||
filter.Authors = append(filter.Authors, v)
|
filter.Authors = append(filter.Authors, v)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user