Filter out some relays from the archive

This commit is contained in:
Daniele Tonon
2023-07-27 22:49:44 +02:00
parent a20b985cc8
commit dcf8e3a451
2 changed files with 14 additions and 1 deletions

View File

@@ -380,7 +380,16 @@ func loadRelaysArchive(ctx context.Context) {
relaysArchive = unique(relaysArchive)
for _, relay := range relaysArchive {
for _, excluded := range excludedRelays {
if strings.Contains(relay, excluded) {
fmt.Printf("Skypping relay %s\n", relay)
continue
}
}
if strings.Contains(relay, "/npub1") {
continue // Skip relays with personalyzed query like filter.nostr.wine
}
fmt.Printf("Adding relay %s\n", relay)
cache.SetWithTTL("ra:"+relay, nil, time.Hour*24*7)
}
}
}