diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/EndpointUrlTag.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/EndpointUrlTag.kt index 3872826b5..acc8b1966 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/EndpointUrlTag.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/EndpointUrlTag.kt @@ -27,9 +27,17 @@ class EndpointUrlTag { companion object Companion { const val TAG_NAME = "endpoint" + /** + * Legacy alias used by first-generation nostrnests web clients, + * which reused the NIP-53 streaming-event tag name for the + * kind-30312 MoQ relay URL. Accepted on read; we always emit + * the canonical [TAG_NAME]. + */ + const val LEGACY_TAG_NAME = "streaming" + fun parse(tag: Array): String? { ensure(tag.has(1)) { return null } - ensure(tag[0] == TAG_NAME) { return null } + ensure(tag[0] == TAG_NAME || tag[0] == LEGACY_TAG_NAME) { return null } ensure(tag[1].isNotEmpty()) { return null } return tag[1] } diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/RoomNameTag.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/RoomNameTag.kt index f952f6c43..3a4b03179 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/RoomNameTag.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/RoomNameTag.kt @@ -27,9 +27,17 @@ class RoomNameTag { companion object Companion { const val TAG_NAME = "room" + /** + * Legacy alias used by first-generation nostrnests web clients, + * which reused the NIP-53 streaming-event `title` tag for the + * kind-30312 room name. Accepted on read; we always emit the + * canonical [TAG_NAME]. + */ + const val LEGACY_TAG_NAME = "title" + fun parse(tag: Array): String? { ensure(tag.has(1)) { return null } - ensure(tag[0] == TAG_NAME) { return null } + ensure(tag[0] == TAG_NAME || tag[0] == LEGACY_TAG_NAME) { return null } ensure(tag[1].isNotEmpty()) { return null } return tag[1] } diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/ServiceUrlTag.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/ServiceUrlTag.kt index 9d85782f9..521a90ac0 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/ServiceUrlTag.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/ServiceUrlTag.kt @@ -27,9 +27,16 @@ class ServiceUrlTag { companion object Companion { const val TAG_NAME = "service" + /** + * Legacy alias used by first-generation nostrnests web clients + * for the moq-auth sidecar URL. Accepted on read; we always emit + * the canonical [TAG_NAME]. + */ + const val LEGACY_TAG_NAME = "auth" + fun parse(tag: Array): String? { ensure(tag.has(1)) { return null } - ensure(tag[0] == TAG_NAME) { return null } + ensure(tag[0] == TAG_NAME || tag[0] == LEGACY_TAG_NAME) { return null } ensure(tag[1].isNotEmpty()) { return null } return tag[1] } diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/StatusTag.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/StatusTag.kt index 49b15c2bd..b3a39cee8 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/StatusTag.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip53LiveActivities/meetingSpaces/tags/StatusTag.kt @@ -40,9 +40,22 @@ class StatusTag { fun parse(code: String): STATUS? = when (code) { PLANNED.code -> PLANNED + OPEN.code -> OPEN + PRIVATE.code -> PRIVATE + CLOSED.code -> CLOSED + + // Legacy aliases used by first-generation nostrnests + // web clients that reused NIP-53 streaming-event + // status values for kind-30312 meeting spaces. + // Accept on read to preserve interop; we always emit + // the canonical EGG-01 codes. + "live" -> OPEN + + "ended" -> CLOSED + else -> null } }