mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-09 13:53:03 +02:00
feat: Only inject vias when manual ones aren't provided during join
This commit is contained in:
parent
66d479e2eb
commit
76b93e252d
1 changed files with 26 additions and 23 deletions
|
@ -156,6 +156,8 @@ pub(crate) async fn join_room_by_id_or_alias_route(
|
|||
.await?;
|
||||
|
||||
let mut servers = body.via.clone();
|
||||
if servers.is_empty() {
|
||||
debug!("No via servers provided for join, injecting some.");
|
||||
servers.extend(
|
||||
services
|
||||
.rooms
|
||||
|
@ -182,6 +184,7 @@ pub(crate) async fn join_room_by_id_or_alias_route(
|
|||
if let Some(server) = room_id.server_name() {
|
||||
servers.push(server.to_owned());
|
||||
}
|
||||
}
|
||||
|
||||
servers.sort_unstable();
|
||||
servers.dedup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue