sdk: FetchWriteRelays() shouldn't have a hardcoded fallback, it's better to fail.

This commit is contained in:
fiatjaf 2025-03-12 00:18:41 -03:00
parent cecc71cd81
commit d2ceac48f6

View File

@ -71,9 +71,6 @@ func (sys *System) FetchInboxRelays(ctx context.Context, pubkey string, n int) [
// from where to read notes authored by other users.
func (sys *System) FetchWriteRelays(ctx context.Context, pubkey string, n int) []string {
rl := sys.FetchRelayList(ctx, pubkey)
if len(rl.Items) == 0 || len(rl.Items) > 7 {
return []string{"wss://relay.damus.io", "wss://nos.lol"}
}
relays := make([]string, 0, n)
for _, r := range rl.Items {