summaryrefslogtreecommitdiffstats
path: root/src/LoginPage.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-04-30 14:04:34 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-04-30 14:46:40 +0200
commit7431b51d2796a93aaebe7b845ee31406a888025b (patch)
treeafeb89e32dfe24ee449991fbc8ea923e5c1ccce8 /src/LoginPage.cpp
parentb160baba4e8ca3f9b349abead0045d827d2e3356 (diff)
Update mtxclient to use new login parameters
fixes #558
Diffstat (limited to 'src/LoginPage.cpp')
-rw-r--r--src/LoginPage.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp
index 0108a9f4..c914d66f 100644
--- a/src/LoginPage.cpp
+++ b/src/LoginPage.cpp
@@ -420,8 +420,11 @@ LoginPage::onLoginButtonClicked(LoginMethod loginMethod)
: deviceName_->text().toStdString(),
[this](const mtx::responses::Login &res, mtx::http::RequestErr err) {
if (err) {
- showErrorMessage(error_label_,
- QString::fromStdString(err->matrix_error.error));
+ auto error = err->matrix_error.error;
+ if (error.empty())
+ error = err->parse_error;
+
+ showErrorMessage(error_label_, QString::fromStdString(error));
emit errorOccurred();
return;
}