diff --git a/nostr.go b/nostr.go index db06bdd..75799e9 100644 --- a/nostr.go +++ b/nostr.go @@ -35,9 +35,11 @@ var ( } profiles = []string{ "wss://purplepag.es", + "wss://relay.noswhere.com", } justIds = []string{ "wss://cache2.primal.net/v1", + "wss://relay.noswhere.com", } trustedPubKeys = []string{ @@ -91,7 +93,6 @@ func getEvent(ctx context.Context, code string, relayHints []string) (*nostr.Eve case nostr.EventPointer: author = v.Author filter.IDs = []string{v.ID} - relays = append(relays, getRandomRelay()) relays = append(relays, v.Relays...) relays = append(relays, justIds...) withRelays = true @@ -110,7 +111,7 @@ func getEvent(ctx context.Context, code string, relayHints []string) (*nostr.Eve case string: if prefix == "note" { filter.IDs = []string{v} - relays = append(relays, getRandomRelay(), getRandomRelay()) + relays = append(relays, getRandomRelay()) relays = append(relays, justIds...) } else if prefix == "npub" { author = v diff --git a/utils.go b/utils.go index f8c4f80..47de7ca 100644 --- a/utils.go +++ b/utils.go @@ -513,6 +513,11 @@ func isntRealRelay(url string) bool { return true } + // hardcoded + if url == "wss://relay.noswhere.com" { + return true + } + // if there is a "/" after the initial "wss://" part that means this is probably a "virtual relay" // like wss://feeds.nostr.band/topic or wss://filter.nostr.wine/pubkey or wss://cache2.primal.net/v1 // and should not be used in computing outbox model relay recommendations