refactor(cli): drop client-metadata log from bunker connect handler

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYpupiVAq4VyHDdjrYyPdi
This commit is contained in:
Claude
2026-06-24 11:28:14 +00:00
parent 55bc75512a
commit 4ae2debd6b
@@ -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)