summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-03-07 05:26:12 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-03-07 05:27:06 +0100
commitac1d6782547223bbd58137cc84ea331477f2438d (patch)
tree19cb8e6334173bf8480c594a8149e452319cfa55 /src
parentUpdate translations (diff)
downloadnheko-ac1d6782547223bbd58137cc84ea331477f2438d.tar.xz
Fix server switching to https after bootstrap
fixes #878
Diffstat (limited to 'src')
-rw-r--r--src/LoginPage.cpp6
-rw-r--r--src/MainWindow.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp

index cdc2262f..6a83376c 100644 --- a/src/LoginPage.cpp +++ b/src/LoginPage.cpp
@@ -163,6 +163,8 @@ LoginPage::checkHomeserverVersion() return; } + nhlog::net()->error("Error requesting versions: {}", *err); + emit versionErrorCb( tr("An unknown error occured. Make sure the homeserver domain is valid.")); return; @@ -276,7 +278,7 @@ LoginPage::onLoginButtonClicked(LoginMethod loginMethod, if (res.well_known) { http::client()->set_server(res.well_known->homeserver.base_url); - nhlog::net()->info("Login requested to user server: " + + nhlog::net()->info("Login requested to use server: " + res.well_known->homeserver.base_url); } @@ -301,7 +303,7 @@ LoginPage::onLoginButtonClicked(LoginMethod loginMethod, if (res.well_known) { http::client()->set_server(res.well_known->homeserver.base_url); - nhlog::net()->info("Login requested to user server: " + + nhlog::net()->info("Login requested to use server: " + res.well_known->homeserver.base_url); } diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index f3893998..73e556f7 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp
@@ -338,8 +338,7 @@ MainWindow::showChatPage() { auto userid = QString::fromStdString(http::client()->user_id().to_string()); auto device_id = QString::fromStdString(http::client()->device_id()); - auto homeserver = QString::fromStdString(http::client()->server() + ":" + - std::to_string(http::client()->port())); + auto homeserver = QString::fromStdString(http::client()->server_url()); auto token = QString::fromStdString(http::client()->access_token()); userSettings_.data()->setUserId(userid);