mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-12-10 21:01:58 +01:00
sdk: fetching sets.
This commit is contained in:
@@ -33,6 +33,11 @@ func (sys *System) FetchSearchRelayList(ctx context.Context, pubkey string) Gene
|
||||
return ml
|
||||
}
|
||||
|
||||
func (sys *System) FetchRelaySets(ctx context.Context, pubkey string) GenericSets[RelayURL] {
|
||||
ml, _ := fetchGenericSets(sys, ctx, pubkey, 30002, kind_30002, parseRelayURL, sys.RelaySetsCache, false)
|
||||
return ml
|
||||
}
|
||||
|
||||
func parseRelayFromKind10002(tag nostr.Tag) (rl Relay, ok bool) {
|
||||
if u := tag.Value(); u != "" && tag[0] == "r" {
|
||||
if !nostr.IsValidRelayURL(u) {
|
||||
|
||||
Reference in New Issue
Block a user