mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-25 00:03:51 +02:00
sdk: FetchWriteRelays() shouldn't have a hardcoded fallback, it's better to fail.
This commit is contained in:
parent
cecc71cd81
commit
d2ceac48f6
@ -71,9 +71,6 @@ func (sys *System) FetchInboxRelays(ctx context.Context, pubkey string, n int) [
|
|||||||
// from where to read notes authored by other users.
|
// from where to read notes authored by other users.
|
||||||
func (sys *System) FetchWriteRelays(ctx context.Context, pubkey string, n int) []string {
|
func (sys *System) FetchWriteRelays(ctx context.Context, pubkey string, n int) []string {
|
||||||
rl := sys.FetchRelayList(ctx, pubkey)
|
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)
|
relays := make([]string, 0, n)
|
||||||
for _, r := range rl.Items {
|
for _, r := range rl.Items {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user