add "unstable" endpoint legacy Element Android/iOS seems to call
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
|
||||
|
||||
use ruma::api::client::thirdparty::get_protocols;
|
||||
|
||||
use crate::{Result, Ruma};
|
||||
use crate::{Result, Ruma, RumaResponse};
|
||||
|
||||
/// # `GET /_matrix/client/r0/thirdparty/protocols`
|
||||
///
|
||||
@@ -15,3 +15,13 @@ pub(crate) async fn get_protocols_route(
|
||||
protocols: BTreeMap::new(),
|
||||
})
|
||||
}
|
||||
|
||||
/// # `GET /_matrix/client/unstable/thirdparty/protocols`
|
||||
///
|
||||
/// Same as `get_protocols_route`, except for some reason Element Android legacy
|
||||
/// calls this
|
||||
pub(crate) async fn get_protocols_route_unstable(
|
||||
body: Ruma<get_protocols::v3::Request>,
|
||||
) -> Result<RumaResponse<get_protocols::v3::Response>> {
|
||||
get_protocols_route(body).await.map(RumaResponse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user