get rid of false positives for isntRealRelay() by not eliminating the path from the relay URL.

This commit is contained in:
fiatjaf
2023-12-23 18:27:48 -03:00
parent 8074a38d89
commit d24cbc8e81

View File

@@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"net/url"
"time"
"github.com/fiatjaf/eventstore"
@@ -163,9 +162,7 @@ func getEvent(ctx context.Context, code string, relayHints []string) (*nostr.Eve
}()
for ie := range pool.SubManyEoseNonUnique(ctx, relays, nostr.Filters{filter}) {
if pu, err := url.Parse(ie.Relay.URL); err == nil {
successRelays = append(successRelays, pu.Scheme+"://"+pu.Host+pu.RawPath)
}
successRelays = append(successRelays, ie.Relay.URL)
result = ie.Event
countdown = min(countdown, 1)
}