aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connection.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 4391a1b2..98555104 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -203,13 +203,12 @@ void Connection::resolveServer(const QString& mxidOrDomain)
connect(job, &BaseJob::finished, [this, job, maybeBaseUrl] {
QUrl baseUrl(job->data().homeserver.baseUrl);
if (!baseUrl.isValid() || job->status() != BaseJob::Success) {
- baseUrl = maybeBaseUrl;
- qCDebug(MAIN) << maybeBaseUrl.host() << "doesn't have .well-known record" << "- using the hostname as is";
+ qCDebug(MAIN) << maybeBaseUrl.host() << "doesn't have valid .well-known file" << "- using the hostname as is";
} else {
qCDebug(MAIN) << ".well-known for" << maybeBaseUrl.host() << "is" << baseUrl.authority();
+ setHomeserver(baseUrl);
}
- setHomeserver(baseUrl);
emit resolved();
job->deleteLater();
});