From 015b0d7dac36e552991da3063449136d933522fa Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 19:11:50 +0000 Subject: [PATCH] fix(audio-rooms): switch NestsServersEvent to kind 10112 (nostrnests claim) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nostrnests's reference README under "Nostr Integration" already declares: kind:10112 — User-published audio server lists We initially picked 10062 (mirroring BlossomServersEvent's 10063) without spotting that prior claim. Switching to 10112 so a single replaceable event surfaces in both Amethyst and nostrnests's web UI without collision. No migration cost — no users have published kind 10062 yet. --- .../model/nip53NestsServers/NestsServerListState.kt | 4 ++-- .../ui/actions/nestsServers/NestsServersScreen.kt | 2 +- .../ui/actions/nestsServers/NestsServersViewModel.kt | 2 +- .../audiorooms/create/CreateAudioRoomViewModel.kt | 2 +- amethyst/src/main/res/values/strings.xml | 2 +- .../nestsServers/NestsServersEvent.kt | 11 ++++++----- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53NestsServers/NestsServerListState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53NestsServers/NestsServerListState.kt index 19bd00534..af5cdd635 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53NestsServers/NestsServerListState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/nip53NestsServers/NestsServerListState.kt @@ -35,7 +35,7 @@ import kotlinx.coroutines.flow.stateIn /** * Per-account state for the user's preferred audio-room (NIP-53 / nests) - * MoQ host servers — kind 10062 [NestsServersEvent]. Mirror of + * MoQ host servers — kind 10112 [NestsServersEvent]. Mirror of * [com.vitorpamplona.amethyst.model.nipB7Blossom.BlossomServerListState] * for the nests use case. * @@ -43,7 +43,7 @@ import kotlinx.coroutines.flow.stateIn * - [flow] — current `List` of saved server base URLs * - [getNestsServersListFlow] — reactive `StateFlow` for * downstream UI to recompose on event arrivals - * - [saveNestsServersList] — build + sign a new replaceable kind 10062 + * - [saveNestsServersList] — build + sign a new replaceable kind 10112 * event (preserving prior tags' alt etc.) * * The list is consumed by [com.vitorpamplona.amethyst.ui.screen.loggedIn.audiorooms.create.CreateAudioRoomViewModel] diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersScreen.kt index f9929e674..ad4380cea 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersScreen.kt @@ -65,7 +65,7 @@ import com.vitorpamplona.amethyst.ui.theme.grayText /** * Settings screen for the user's preferred audio-room (NIP-53 / nests) - * MoQ host servers — kind 10062 [com.vitorpamplona.quartz.nip53LiveActivities.nestsServers.NestsServersEvent]. + * MoQ host servers — kind 10112 [com.vitorpamplona.quartz.nip53LiveActivities.nestsServers.NestsServersEvent]. * * Mirrors [com.vitorpamplona.amethyst.ui.actions.mediaServers.AllMediaServersScreen] * — top bar with Cancel / Save, list of saved servers with delete diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersViewModel.kt index b7bdd18b6..c4b6aed60 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/nestsServers/NestsServersViewModel.kt @@ -42,7 +42,7 @@ import kotlinx.coroutines.flow.update * [_servers] buffer. * 3. [addServer] / [removeServer] / [removeAllServers] mutate the * buffer, marking [isModified] = true. - * 4. [save] publishes a fresh kind-10062 [com.vitorpamplona.quartz.nip53LiveActivities.nestsServers.NestsServersEvent] + * 4. [save] publishes a fresh kind-10112 [com.vitorpamplona.quartz.nip53LiveActivities.nestsServers.NestsServersEvent] * via [Account.sendNestsServersList]. */ @Stable diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/audiorooms/create/CreateAudioRoomViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/audiorooms/create/CreateAudioRoomViewModel.kt index c03ff81ce..e3cd089c8 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/audiorooms/create/CreateAudioRoomViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/audiorooms/create/CreateAudioRoomViewModel.kt @@ -54,7 +54,7 @@ class CreateAudioRoomViewModel : ViewModel() { fun bindAccountIfMissing(accountViewModel: AccountViewModel) { if (account != null) return account = accountViewModel - // Seed the URL fields from the user's saved kind-10062 list so + // Seed the URL fields from the user's saved kind-10112 list so // first-time use flows naturally from the Settings screen. If // the list is empty (or the user hasn't published one yet), keep // the nostrnests.com defaults already in [FormState.defaults]. diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index b9fc0bfb1..ba13d443e 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -535,7 +535,7 @@ Audio-room servers Choose which MoQ host servers Amethyst publishes your audio rooms to. The first entry is used by default when you start a new space. Your servers - Saved as a kind-10062 replaceable event so other clients can read your preference. + Saved as a kind-10112 replaceable event so other clients can read your preference. Add an audio-room server Recommended servers Built-in suggestions you can add to your list with one tap. diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/nestsServers/NestsServersEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/nestsServers/NestsServersEvent.kt index cbd1fd7d5..3dc19e1ff 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/nestsServers/NestsServersEvent.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/nestsServers/NestsServersEvent.kt @@ -33,12 +33,13 @@ import com.vitorpamplona.quartz.utils.TimeUtils * Replaceable event listing the audio-room (NIP-53 / nests) MoQ host * servers a user prefers to publish their kind-30312 spaces against. * - * Kind: **10062** (proposed; mirrors BlossomServersEvent's 10063 layout). - * - * Wire shape — one `server` tag per host base URL: + * Kind: **10112** — declared by nostrnests's reference README under + * "User-published audio server lists". Wire shape mirrors + * BlossomServersEvent's 10063 layout (one `server` tag per host base + * URL). * * { - * "kind": 10062, + * "kind": 10112, * "tags": [ * ["alt", "Audio-room (nests) MoQ servers used by the author"], * ["server", "https://moq.nostrnests.com"], @@ -78,7 +79,7 @@ class NestsServersEvent( } companion object { - const val KIND = 10062 + const val KIND = 10112 const val ALT = "Audio-room (nests) MoQ servers used by the author" fun createAddress(pubKey: HexKey): Address = Address(KIND, pubKey, FIXED_D_TAG)