mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
RelayConfig.wsUrl derived the WebSocket scheme with `uri.scheme == 'https' ? 'wss' : 'ws'`, mapping every non-https scheme (including wss) to plaintext ws, so a base URL already using wss:// was silently downgraded to ws://. Invite-joined communities store their relay as wss://, so invited members' connections lost transport encryption and failed outright against TLS-only relays, making the community unusable for them. Map the scheme explicitly (https/wss -> wss, http/ws -> ws, other schemes pass through unchanged); only the wss -> ws downgrade changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Max Lampert <maxwell@squareup.com>