mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
Filter out some relays from the archive
This commit is contained in:
11
utils.go
11
utils.go
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user