Skip to content
Snippets Groups Projects
Unverified Commit ad7b3f18 authored by Timo Kösters's avatar Timo Kösters
Browse files

improvement: send 200 response for turn server info

We didn't implement it, but this will stop clients from retrying the
endpoint every minute
parent d45d033b
No related branches found
No related tags found
No related merge requests found
use crate::{ConduitResult, Error}; use crate::ConduitResult;
use ruma::api::client::{error::ErrorKind, r0::message::send_message_event}; use ruma::api::client::r0::voip::get_turn_server_info;
use std::time::Duration;
#[cfg(feature = "conduit_bin")] #[cfg(feature = "conduit_bin")]
use rocket::get; use rocket::get;
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/voip/turnServer"))] #[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/voip/turnServer"))]
pub async fn turn_server_route() -> ConduitResult<send_message_event::Response> { pub async fn turn_server_route() -> ConduitResult<get_turn_server_info::Response> {
Err(Error::BadRequest( Ok(get_turn_server_info::Response {
ErrorKind::NotFound, username: "".to_owned(),
"There is no turn server yet.", password: "".to_owned(),
)) uris: Vec::new(),
ttl: Duration::from_secs(60 * 60 * 24),
}
.into())
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment