aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'connection.cpp')
-rw-r--r--connection.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/connection.cpp b/connection.cpp
index 3e4f1efb..368abc8e 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -164,7 +164,8 @@ void Connection::doConnectToServer(const QString& user, const QString& password,
deviceId, initialDeviceName);
connect(loginJob, &BaseJob::success, this,
[=] {
- setHomeserver(loginJob->homeServer());
+ setHomeserver(QUrl::fromUserInput(
+ homeserver().scheme() + "://" + loginJob->homeServer()));
d->connectWithToken(loginJob->userId(), loginJob->accessToken(),
loginJob->deviceId());
});
@@ -488,11 +489,11 @@ QByteArray Connection::generateTxnId()
void Connection::setHomeserver(const QUrl& url)
{
- if (d->data->baseUrl() == url)
+ if (homeserver() == url)
return;
d->data->setBaseUrl(url);
- emit homeserverChanged(url);
+ emit homeserverChanged(homeserver());
}
static constexpr int CACHE_VERSION_MAJOR = 1;