2021-01-11 16:26:47 +00:00
|
|
|
use crate::ConduitResult;
|
|
|
|
use ruma::api::client::r0::voip::get_turn_server_info;
|
|
|
|
use std::time::Duration;
|
2020-07-30 17:14:47 +01:00
|
|
|
|
|
|
|
#[cfg(feature = "conduit_bin")]
|
|
|
|
use rocket::get;
|
|
|
|
|
|
|
|
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/voip/turnServer"))]
|
2021-02-28 11:41:03 +00:00
|
|
|
#[tracing::instrument]
|
2021-01-11 16:26:47 +00:00
|
|
|
pub async fn turn_server_route() -> ConduitResult<get_turn_server_info::Response> {
|
|
|
|
Ok(get_turn_server_info::Response {
|
|
|
|
username: "".to_owned(),
|
|
|
|
password: "".to_owned(),
|
|
|
|
uris: Vec::new(),
|
|
|
|
ttl: Duration::from_secs(60 * 60 * 24),
|
|
|
|
}
|
|
|
|
.into())
|
2020-07-30 17:14:47 +01:00
|
|
|
}
|