1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-07-27 17:28:36 +00:00

feat(turn): move config to table & error when no config is set

This commit is contained in:
Matthias Ahouansou 2024-05-28 14:30:46 +01:00
parent a9ff97e527
commit dbc1daaefb
No known key found for this signature in database
4 changed files with 106 additions and 89 deletions

View file

@ -7,7 +7,7 @@ use ruma::{
use crate::api::server_server::DestinationResponse;
use crate::{services, Config, Error, Result};
use crate::{config::TurnConfig, services, Config, Error, Result};
use futures_util::FutureExt;
use hickory_resolver::TokioAsyncResolver;
use hyper_util::client::legacy::connect::dns::{GaiResolver, Name as HyperName};
@ -348,6 +348,10 @@ impl Service {
&self.config.trusted_servers
}
pub fn turn(&self) -> Option<TurnConfig> {
self.config.turn()
}
pub fn dns_resolver(&self) -> &TokioAsyncResolver {
&self.dns_resolver
}
@ -356,26 +360,6 @@ impl Service {
self.jwt_decoding_key.as_ref()
}
pub fn turn_password(&self) -> &String {
&self.config.turn_password
}
pub fn turn_ttl(&self) -> u64 {
self.config.turn_ttl
}
pub fn turn_uris(&self) -> &[String] {
&self.config.turn_uris
}
pub fn turn_username(&self) -> &String {
&self.config.turn_username
}
pub fn turn_secret(&self) -> &String {
&self.config.turn_secret
}
pub fn emergency_password(&self) -> &Option<String> {
&self.config.emergency_password
}