diff options
author | Black Hat <bhat@encom.eu.org> | 2019-07-05 10:15:54 +0800 |
---|---|---|
committer | Black Hat <bhat@encom.eu.org> | 2019-07-05 10:15:54 +0800 |
commit | 5d9d56a4fe9f3178c8bc9b3839ec608659c0c371 (patch) | |
tree | 031ff036540985439aa44a4ca67abb64e8254e1a | |
parent | a9984d39e5186e2cfd105cf2ffb4148d9a8573a2 (diff) | |
download | libquotient-5d9d56a4fe9f3178c8bc9b3839ec608659c0c371.tar.gz libquotient-5d9d56a4fe9f3178c8bc9b3839ec608659c0c371.zip |
Clean up .well-known logic
-rw-r--r-- | lib/connection.cpp | 5 |
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(); }); |