This commit is contained in:
fiatjaf
2023-10-02 09:13:36 -03:00
parent 978d7825b5
commit a0f6dec451

View File

@@ -38,12 +38,12 @@ func FetchRelaysForPubkey(ctx context.Context, pool *nostr.SimplePool, pubkey st
result := make([]Relay, 0, 20) result := make([]Relay, 0, 20)
i := 0 i := 0
for event := range ch { for ie := range ch {
switch event.Kind { switch ie.Event.Kind {
case nostr.KindRelayListMetadata: case nostr.KindRelayListMetadata:
result = append(result, ParseRelaysFromKind10002(event)...) result = append(result, ParseRelaysFromKind10002(ie.Event)...)
case nostr.KindContactList: case nostr.KindContactList:
result = append(result, ParseRelaysFromKind3(event)...) result = append(result, ParseRelaysFromKind3(ie.Event)...)
} }
i++ i++