fix(api): restore backwards compatibility for RTC foci config

This commit is contained in:
Niklas Wojtkowiak
2026-02-23 14:15:32 -05:00
committed by 0xnim
parent c97dd54766
commit 8a254a33cc
4 changed files with 54 additions and 13 deletions
+14 -5
View File
@@ -27,7 +27,11 @@ pub(crate) async fn well_known_client(
identity_server: None,
sliding_sync_proxy: Some(SlidingSyncProxyInfo { url: client_url }),
tile_server: None,
rtc_foci: vec![],
rtc_foci: services
.config
.matrix_rtc
.effective_foci(&services.config.well_known.rtc_focus_server_urls)
.to_vec(),
})
}
@@ -38,10 +42,15 @@ pub(crate) async fn well_known_client(
/// homeserver, implementing MSC4143.
pub(crate) async fn get_rtc_transports(
State(services): State<crate::State>,
) -> Result<impl IntoResponse> {
Ok(Json(serde_json::json!({
"rtc_foci": services.config.matrix_rtc.foci,
})))
_body: Ruma<ruma::api::client::discovery::get_rtc_transports::Request>,
) -> Result<ruma::api::client::discovery::get_rtc_transports::Response> {
Ok(ruma::api::client::discovery::get_rtc_transports::Response::new(
services
.config
.matrix_rtc
.effective_foci(&services.config.well_known.rtc_focus_server_urls)
.to_vec(),
))
}
/// # `GET /.well-known/matrix/support`
+1 -8
View File
@@ -184,14 +184,7 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
.ruma_route(&client::put_suspended_status)
.ruma_route(&client::well_known_support)
.ruma_route(&client::well_known_client)
.route(
"/_matrix/client/v1/rtc/transports",
get(client::get_rtc_transports),
)
.route(
"/_matrix/client/unstable/org.matrix.msc4143/rtc/transports",
get(client::get_rtc_transports),
)
.ruma_route(&client::get_rtc_transports)
.route("/_conduwuit/server_version", get(client::conduwuit_server_version))
.route("/_continuwuity/server_version", get(client::conduwuit_server_version))
.ruma_route(&client::room_initial_sync_route)