Main: Add debug output for resolving server names
This commit is contained in:
parent
e4cecf1bf5
commit
82a76a17af
1 changed files with 10 additions and 2 deletions
12
src/main.rs
12
src/main.rs
|
@ -83,11 +83,19 @@ async fn process_media(source: MediaSource, body: Option<String>, server: Option
|
|||
let media_id = uri.media_id()?;
|
||||
|
||||
let client = match server {
|
||||
Some(ref url) => Client::builder().server_name_or_homeserver_url(url),
|
||||
Some(ref url) => {
|
||||
debug!("Resolving server name or homeserver url '{url}' from command line");
|
||||
|
||||
Client::builder().server_name_or_homeserver_url(url)
|
||||
},
|
||||
// NOTE: We know that server_name is not a URL at this point, however if resolving .well-known
|
||||
// delegation fails falling back to interpreting the server name as the base URL is somewhat
|
||||
// more resilient. Just had this now.
|
||||
None => Client::builder().server_name_or_homeserver_url(server_name),
|
||||
None => {
|
||||
debug!("Resolving server name or homeserver url '{server_name}' mxc uri '{uri}'");
|
||||
|
||||
Client::builder().server_name_or_homeserver_url(server_name)
|
||||
},
|
||||
}.build().await?;
|
||||
|
||||
debug!("Downloading {} from {}", uri, client.homeserver());
|
||||
|
|
Loading…
Reference in a new issue