diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-30 02:43:36 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-30 02:43:36 +0200 |
commit | 00f251753e41bd1c65f9e4160fe5b267ce8385ba (patch) | |
tree | d1292f8b6b89b511ec920ce272c3092591b438fc /src/LoginPage.cpp | |
parent | Fix tags going missing if you join communities (diff) | |
download | nheko-00f251753e41bd1c65f9e4160fe5b267ce8385ba.tar.xz |
Use coeurl for networking
Something is still wrong on shutdown, need to debug that. And CI will fail.
Diffstat (limited to 'src/LoginPage.cpp')
-rw-r--r-- | src/LoginPage.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp index c914d66f..f53d81ba 100644 --- a/src/LoginPage.cpp +++ b/src/LoginPage.cpp @@ -263,9 +263,7 @@ LoginPage::onMatrixIdEntered() http::client()->well_known([this](const mtx::responses::WellKnown &res, mtx::http::RequestErr err) { if (err) { - using namespace boost::beast::http; - - if (err->status_code == status::not_found) { + if (err->status_code == 404) { nhlog::net()->info("Autodiscovery: No .well-known."); checkHomeserverVersion(); return; @@ -282,8 +280,9 @@ LoginPage::onMatrixIdEntered() emit versionErrorCb(tr("Autodiscovery failed. Unknown error when " "requesting .well-known.")); nhlog::net()->error("Autodiscovery failed. Unknown error when " - "requesting .well-known. {}", - err->error_code.message()); + "requesting .well-known. {} {}", + err->status_code, + err->error_code); return; } @@ -301,9 +300,7 @@ LoginPage::checkHomeserverVersion() http::client()->versions( [this](const mtx::responses::Versions &, mtx::http::RequestErr err) { if (err) { - using namespace boost::beast::http; - - if (err->status_code == status::not_found) { + if (err->status_code == 404) { emit versionErrorCb(tr("The required endpoints were not found. " "Possibly not a Matrix server.")); return; |