mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-09-15 18:57:03 +00:00
make_join delegation
This commit is contained in:
parent
2089ca8e3c
commit
7e54066023
2 changed files with 18 additions and 15 deletions
|
@ -10,7 +10,7 @@ use tokio::sync::OnceCell;
|
|||
use crate::api::server_server::DestinationResponse;
|
||||
|
||||
use crate::{services, Config, Error, Result};
|
||||
use futures_util::{FutureExt, TryFutureExt};
|
||||
use futures_util::FutureExt;
|
||||
use hickory_resolver::TokioAsyncResolver;
|
||||
use hyper_util::client::legacy::connect::dns::{GaiResolver, Name as HyperName};
|
||||
use reqwest::dns::{Addrs, Name, Resolve, Resolving};
|
||||
|
@ -519,7 +519,7 @@ impl Service {
|
|||
for mut alias_or_id in self.config.default_rooms.iter().cloned() {
|
||||
// anything that does not start '!' should be considered an alias
|
||||
// empty strings are ignored
|
||||
let room_id = if Some('!') == alias_or_id.chars().next() {
|
||||
let room_id = if alias_or_id.starts_with('!') {
|
||||
if alias_or_id.split_once(':').is_none() {
|
||||
alias_or_id = format!("{}:{}", alias_or_id, self.config.server_name);
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ impl Service {
|
|||
Error::bad_config("Invalid room alias for join-by-default rooms.")
|
||||
})?;
|
||||
|
||||
if room_alias.server_name() == &self.config.server_name {
|
||||
if room_alias.server_name() == self.config.server_name {
|
||||
services()
|
||||
.rooms
|
||||
.alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue