aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-30 11:56:59 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-30 11:56:59 +0900
commitd01154a1899e216b04d6fd2ad3bb384715ca843b (patch)
tree3830cc12047e8e93e0a4bcd37651efa307ea5545 /connection.cpp
parentbcdede472add732c49c95564034c8cfa1c38c725 (diff)
downloadlibquotient-d01154a1899e216b04d6fd2ad3bb384715ca843b.tar.gz
libquotient-d01154a1899e216b04d6fd2ad3bb384715ca843b.zip
Connection: no more default to matrix.org; update HS URL from /login response
Diffstat (limited to 'connection.cpp')
-rw-r--r--connection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/connection.cpp b/connection.cpp
index 8630f976..be4a712a 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -77,10 +77,9 @@ Connection::Connection(const QUrl& server, QObject* parent)
d->q = this; // All d initialization should occur before this line
}
-Connection::Connection()
- : Connection(QUrl("https://matrix.org"))
-{
-}
+Connection::Connection(QObject* parent)
+ : Connection({}, parent)
+{ }
Connection::~Connection()
{
@@ -165,6 +164,7 @@ void Connection::doConnectToServer(const QString& user, const QString& password,
deviceId, initialDeviceName);
connect(loginJob, &BaseJob::success, this,
[=] {
+ setHomeserver(loginJob->homeServer());
d->connectWithToken(loginJob->userId(), loginJob->accessToken(),
loginJob->deviceId());
});