mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
parent
b5ae84c3c3
commit
ed36bdb037
1 changed files with 7 additions and 1 deletions
|
@ -121,7 +121,13 @@ MatrixClient::onLoginResponse(QNetworkReply *reply)
|
|||
|
||||
try {
|
||||
response.deserialize(json);
|
||||
emit loginSuccess(response.getUserId(), server_.host(), response.getAccessToken());
|
||||
|
||||
auto hostname = server_.host();
|
||||
|
||||
if (server_.port() > 0)
|
||||
hostname = QString("%1:%2").arg(server_.host()).arg(server_.port());
|
||||
|
||||
emit loginSuccess(response.getUserId(), hostname, response.getAccessToken());
|
||||
} catch (DeserializationException &e) {
|
||||
qWarning() << "Malformed JSON response" << e.what();
|
||||
emit loginError(tr("Malformed response. Possibly not a Matrix server"));
|
||||
|
|
Loading…
Reference in a new issue