use noswhere relay as a source for profiles and random ids (@semisol).

This commit is contained in:
fiatjaf
2023-12-02 19:43:52 -03:00
parent 0b92b68724
commit bd67496baf
2 changed files with 8 additions and 2 deletions

View File

@@ -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

View File

@@ -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