mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user