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:
+2
-2
@@ -35,7 +35,7 @@ import kotlinx.coroutines.flow.stateIn
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Per-account state for the user's preferred audio-room (NIP-53 / nests)
|
* 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]
|
* [com.vitorpamplona.amethyst.model.nipB7Blossom.BlossomServerListState]
|
||||||
* for the nests use case.
|
* for the nests use case.
|
||||||
*
|
*
|
||||||
@@ -43,7 +43,7 @@ import kotlinx.coroutines.flow.stateIn
|
|||||||
* - [flow] — current `List<String>` of saved server base URLs
|
* - [flow] — current `List<String>` of saved server base URLs
|
||||||
* - [getNestsServersListFlow] — reactive `StateFlow<NoteState>` for
|
* - [getNestsServersListFlow] — reactive `StateFlow<NoteState>` for
|
||||||
* downstream UI to recompose on event arrivals
|
* 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.)
|
* event (preserving prior tags' alt etc.)
|
||||||
*
|
*
|
||||||
* The list is consumed by [com.vitorpamplona.amethyst.ui.screen.loggedIn.audiorooms.create.CreateAudioRoomViewModel]
|
* The list is consumed by [com.vitorpamplona.amethyst.ui.screen.loggedIn.audiorooms.create.CreateAudioRoomViewModel]
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@ import com.vitorpamplona.amethyst.ui.theme.grayText
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings screen for the user's preferred audio-room (NIP-53 / nests)
|
* 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]
|
* Mirrors [com.vitorpamplona.amethyst.ui.actions.mediaServers.AllMediaServersScreen]
|
||||||
* — top bar with Cancel / Save, list of saved servers with delete
|
* — top bar with Cancel / Save, list of saved servers with delete
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ import kotlinx.coroutines.flow.update
|
|||||||
* [_servers] buffer.
|
* [_servers] buffer.
|
||||||
* 3. [addServer] / [removeServer] / [removeAllServers] mutate the
|
* 3. [addServer] / [removeServer] / [removeAllServers] mutate the
|
||||||
* buffer, marking [isModified] = true.
|
* 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].
|
* via [Account.sendNestsServersList].
|
||||||
*/
|
*/
|
||||||
@Stable
|
@Stable
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ class CreateAudioRoomViewModel : ViewModel() {
|
|||||||
fun bindAccountIfMissing(accountViewModel: AccountViewModel) {
|
fun bindAccountIfMissing(accountViewModel: AccountViewModel) {
|
||||||
if (account != null) return
|
if (account != null) return
|
||||||
account = accountViewModel
|
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
|
// first-time use flows naturally from the Settings screen. If
|
||||||
// the list is empty (or the user hasn't published one yet), keep
|
// the list is empty (or the user hasn't published one yet), keep
|
||||||
// the nostrnests.com defaults already in [FormState.defaults].
|
// the nostrnests.com defaults already in [FormState.defaults].
|
||||||
|
|||||||
@@ -535,7 +535,7 @@
|
|||||||
<string name="nests_servers_title">Audio-room servers</string>
|
<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_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_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_add_field">Add an audio-room server</string>
|
||||||
<string name="nests_servers_recommended_section">Recommended servers</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>
|
<string name="nests_servers_recommended_explainer">Built-in suggestions you can add to your list with one tap.</string>
|
||||||
|
|||||||
+6
-5
@@ -33,12 +33,13 @@ import com.vitorpamplona.quartz.utils.TimeUtils
|
|||||||
* Replaceable event listing the audio-room (NIP-53 / nests) MoQ host
|
* Replaceable event listing the audio-room (NIP-53 / nests) MoQ host
|
||||||
* servers a user prefers to publish their kind-30312 spaces against.
|
* servers a user prefers to publish their kind-30312 spaces against.
|
||||||
*
|
*
|
||||||
* Kind: **10062** (proposed; mirrors BlossomServersEvent's 10063 layout).
|
* Kind: **10112** — declared by nostrnests's reference README under
|
||||||
*
|
* "User-published audio server lists". Wire shape mirrors
|
||||||
* Wire shape — one `server` tag per host base URL:
|
* BlossomServersEvent's 10063 layout (one `server` tag per host base
|
||||||
|
* URL).
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* "kind": 10062,
|
* "kind": 10112,
|
||||||
* "tags": [
|
* "tags": [
|
||||||
* ["alt", "Audio-room (nests) MoQ servers used by the author"],
|
* ["alt", "Audio-room (nests) MoQ servers used by the author"],
|
||||||
* ["server", "https://moq.nostrnests.com"],
|
* ["server", "https://moq.nostrnests.com"],
|
||||||
@@ -78,7 +79,7 @@ class NestsServersEvent(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val KIND = 10062
|
const val KIND = 10112
|
||||||
const val ALT = "Audio-room (nests) MoQ servers used by the author"
|
const val ALT = "Audio-room (nests) MoQ servers used by the author"
|
||||||
|
|
||||||
fun createAddress(pubKey: HexKey): Address = Address(KIND, pubKey, FIXED_D_TAG)
|
fun createAddress(pubKey: HexKey): Address = Address(KIND, pubKey, FIXED_D_TAG)
|
||||||
|
|||||||
Reference in New Issue
Block a user