Relay config by json (#47)

* relay-config.json

* fix README.md

* trustedPubKeys is not relay configuration

* update README.md
This commit is contained in:
mattn
2024-02-18 02:05:22 +09:00
committed by GitHub
parent d09ff98ab8
commit 1019fef1d3
7 changed files with 130 additions and 47 deletions

View File

@@ -430,10 +430,10 @@ func humanDate(createdAt nostr.Timestamp) string {
func getRandomRelay() string {
if serial == 0 {
serial = rand.Intn(len(everything))
serial = rand.Intn(len(relayConfig.Everything))
}
serial = (serial + 1) % len(everything)
return everything[serial]
serial = (serial + 1) % len(relayConfig.Everything)
return relayConfig.Everything[serial]
}
func isntRealRelay(url string) bool {