From 95ab9e6528a4a64219bae1bfd41749ce5a1fc076 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 13 Jul 2026 14:14:30 -0400 Subject: [PATCH] fix(desktop,cli): match the new interactive auth-callback signature The relay-auth fix added an `interactive` flag to RelayAuthenticator.signWithAllLoggedInUsers; update the desktop and cli implementers (which don't prompt) to the 3-arg lambda. Co-Authored-By: Claude Opus 4.8 (1M context) --- cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/Context.kt | 2 +- .../amethyst/desktop/auth/DesktopAuthCoordinator.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/Context.kt b/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/Context.kt index b478ef8b85..82cc60df9a 100644 --- a/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/Context.kt +++ b/cli/src/main/kotlin/com/vitorpamplona/amethyst/cli/Context.kt @@ -258,7 +258,7 @@ class Context( private val relayAuth: RelayAuthenticator = RelayAuthenticator( client = client, - signWithAllLoggedInUsers = { _, template -> + signWithAllLoggedInUsers = { _, template, _ -> if (signer is NostrSignerInternal) { runCatching { listOf(signer.sign(template)) }.getOrElse { emptyList() } } else { diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/auth/DesktopAuthCoordinator.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/auth/DesktopAuthCoordinator.kt index 0f6de969a9..fa06c42d16 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/auth/DesktopAuthCoordinator.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/auth/DesktopAuthCoordinator.kt @@ -105,7 +105,7 @@ class DesktopAuthCoordinator( RelayAuthenticator( client = relayManager.client, scope = scope, - signWithAllLoggedInUsers = { relayUrl, template -> + signWithAllLoggedInUsers = { relayUrl, template, _ -> val signed = signWithPolicy(account, relayUrl, template, policy) signed?.let { listOf(it) } ?: emptyList() },