fix(audio-rooms): switch NestsServersEvent to kind 10112 (nostrnests claim)

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.
This commit is contained in:
Claude
2026-04-26 19:11:50 +00:00
parent 13e84f276d
commit 015b0d7dac
6 changed files with 12 additions and 11 deletions
@@ -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<String>` of saved server base URLs
* - [getNestsServersListFlow] — reactive `StateFlow<NoteState>` 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]
@@ -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
@@ -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
@@ -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].
+1 -1
View File
@@ -535,7 +535,7 @@
<string name="nests_servers_title">Audio-room servers</string>
<string name="nests_servers_explainer">Choose which MoQ host servers Amethyst publishes your audio rooms to. The first entry is used by default when you start a new space.</string>
<string name="nests_servers_my_section">Your servers</string>
<string name="nests_servers_my_explainer">Saved as a kind-10062 replaceable event so other clients can read your preference.</string>
<string name="nests_servers_my_explainer">Saved as a kind-10112 replaceable event so other clients can read your preference.</string>
<string name="nests_servers_add_field">Add an audio-room server</string>
<string name="nests_servers_recommended_section">Recommended servers</string>
<string name="nests_servers_recommended_explainer">Built-in suggestions you can add to your list with one tap.</string>
@@ -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)