From 7fba76d7e4e63e0c29da81d6be43330743af1aaf Mon Sep 17 00:00:00 2001 From: bndw Date: Sun, 8 Feb 2026 10:25:39 -0800 Subject: fix: correct WebSocket GUID constant (RFC 6455) Fixed typo in WebSocket GUID that was causing handshake failures. The GUID had '5AB5' instead of 'C5AB0' in the middle section. Correct value: 258EAFA5-E914-47DA-95CA-C5AB0DC85B11 This also includes the implementation of an internal WebSocket client to replace the external dependency, providing a minimal implementation tailored for Nostr relay connections. --- relay.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'relay.go') diff --git a/relay.go b/relay.go index bda76af..b34a61d 100644 --- a/relay.go +++ b/relay.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/coder/websocket" + "northwest.io/nostr/internal/websocket" ) // Relay represents a connection to a Nostr relay. @@ -24,7 +24,7 @@ type Relay struct { // Connect establishes a WebSocket connection to the relay. func Connect(ctx context.Context, url string) (*Relay, error) { - conn, _, err := websocket.Dial(ctx, url, nil) + conn, err := websocket.Dial(ctx, url) if err != nil { return nil, fmt.Errorf("failed to connect to relay: %w", err) } -- cgit v1.2.3