get rid of shouldUseRelayForNip19(), use isntRealRelay().

This commit is contained in:
fiatjaf
2023-12-23 18:28:23 -03:00
parent d24cbc8e81
commit f79cb1e9a2
2 changed files with 7 additions and 24 deletions

View File

@@ -484,25 +484,6 @@ func humanDate(createdAt nostr.Timestamp) string {
}
}
func shouldUseRelayForNip19(relayUrl string) bool {
for _, excluded := range excludedRelays {
if strings.Contains(relayUrl, excluded) {
return false
}
}
urlp, err := url.Parse(relayUrl)
if err != nil {
return false
}
if urlp.Scheme != "wss" && urlp.Scheme != "ws" {
return false
}
if urlp.Path != "" && urlp.Path != "/" {
return false
}
return true
}
func getRandomRelay() string {
if serial == 0 {
serial = rand.Intn(len(everything))