mirror of
https://github.com/fiatjaf/nak.git
synced 2025-09-01 06:20:46 -04:00
update go-nostr so just "localhost[:port]" works as a relay url.
This commit is contained in:
5
relay.go
5
relay.go
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/nbd-wtf/go-nostr/nip11"
|
||||
"github.com/urfave/cli/v3"
|
||||
@@ -22,10 +21,6 @@ var relay = &cli.Command{
|
||||
return fmt.Errorf("specify the <relay-url>")
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(url, "wss://") && !strings.HasPrefix(url, "ws://") {
|
||||
url = "wss://" + url
|
||||
}
|
||||
|
||||
info, err := nip11.Fetch(ctx, url)
|
||||
if err != nil {
|
||||
lineProcessingError(ctx, "failed to fetch '%s' information document: %w", url, err)
|
||||
|
Reference in New Issue
Block a user