Allow port number as part of the hostname

closes #21
remotes/origin/HEAD
Konstantinos Sideris 7 years ago
parent b5ae84c3c3
commit ed36bdb037
  1. 8
      src/MatrixClient.cc

@ -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…
Cancel
Save