feat: use livekit compatible root schema

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2025-04-26 00:59:01 +02:00
parent e91652cb78
commit 88619b044a
1 changed files with 23 additions and 11 deletions

View File

@ -18,36 +18,48 @@ data class Root(
@Serializable
data class Features(
val captcha: CAPTCHA,
val captcha: CAPTCHAFeature,
val email: Boolean,
@SerialName("invite_only")
val inviteOnly: Boolean,
val autumn: Autumn,
val january: Autumn,
val voso: Voso
@SerialName("invite_only") val inviteOnly: Boolean,
val autumn: AutumnJanuaryFeature,
val january: AutumnJanuaryFeature,
val voso: LegacyVoiceFeature? = null,
val livekit: LiveKitFeature? = null,
)
@Serializable
data class Autumn(
data class AutumnJanuaryFeature(
val enabled: Boolean,
val url: String
)
@Serializable
data class CAPTCHA(
data class CAPTCHAFeature(
val enabled: Boolean,
val key: String
)
@Serializable
data class Voso(
data class LegacyVoiceFeature(
val enabled: Boolean,
val url: String,
val ws: String
)
@Serializable
data class LiveKitFeature(
val enabled: Boolean,
val nodes: List<LiveKitNode>
)
@Serializable
data class LiveKitNode(
val name: String,
val lat: Double,
val lon: Double,
@SerialName("public_url") val publicUrl: String,
)
suspend fun getRootRoute(): Root {
return RevoltHttp.get("/".api()).body()
}