From 4ae2debd6bc591d0177556a8bf5561f0deca0fb3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 24 Jun 2026 11:28:14 +0000 Subject: [PATCH] refactor(cli): drop client-metadata log from bunker connect handler Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01PYpupiVAq4VyHDdjrYyPdi --- .../amethyst/cli/commands/BunkerCommand.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/commands/BunkerCommand.kt b/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/commands/BunkerCommand.kt index d5105c803a..12f68685d7 100644 --- a/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/commands/BunkerCommand.kt +++ b/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/commands/BunkerCommand.kt @@ -233,20 +233,12 @@ object BunkerCommand { val response: BunkerResponse = try { when (request) { - is BunkerRequestConnect -> { - // NIP-46 client metadata is a display-only hint (the client - // pubkey is unauthenticated in bunker:// pairing), so we only - // surface it — never gate the ACK on it. - request.clientMetadata?.let { meta -> - val label = listOfNotNull(meta.name, meta.url).joinToString(" — ").ifEmpty { "unnamed client" } - System.err.println("[bunker] connect request identifies as: $label") - } + is BunkerRequestConnect -> if (request.secret == secret) { BunkerResponseAck(request.id) } else { BunkerResponseError(request.id, "invalid secret") } - } is BunkerRequestGetPublicKey -> BunkerResponsePublicKey(request.id, signer.pubKey) is BunkerRequestGetRelays -> BunkerResponseGetRelays(request.id, relays.associate { it.url to ReadWrite(read = true, write = true) }) is BunkerRequestPing -> BunkerResponsePong(request.id)