summary refs log tree commit diff
path: root/src/Login.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-03 02:47:37 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-03 02:47:37 +0200
commit914bdecc0b8e57a3b4e75b218b02909172ada7e3 (patch)
tree115c7d85758e503921cd5443af9e007b07849625 /src/Login.cc
parentAdd basic support for m.video messages (diff)
downloadnheko-914bdecc0b8e57a3b4e75b218b02909172ada7e3.tar.xz
Initial integration with matrix-structs
Diffstat (limited to 'src/Login.cc')
-rw-r--r--src/Login.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/Login.cc b/src/Login.cc

index ca41d019..3e681a76 100644 --- a/src/Login.cc +++ b/src/Login.cc
@@ -47,25 +47,3 @@ LoginRequest::serialize() noexcept return QJsonDocument(body).toJson(QJsonDocument::Compact); } - -void -LoginResponse::deserialize(const QJsonDocument &data) -{ - if (!data.isObject()) - throw DeserializationException("Login response is not a JSON object"); - - QJsonObject object = data.object(); - - if (object.value("access_token") == QJsonValue::Undefined) - throw DeserializationException("Login: missing access_token param"); - - if (object.value("home_server") == QJsonValue::Undefined) - throw DeserializationException("Login: missing home_server param"); - - if (object.value("user_id") == QJsonValue::Undefined) - throw DeserializationException("Login: missing user_id param"); - - access_token_ = object.value("access_token").toString(); - home_server_ = object.value("home_server").toString(); - user_id_ = object.value("user_id").toString(); -}