diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-09-29 22:22:49 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-09-29 22:22:49 +0900 |
commit | b55334ac0fe89f780776bc4eab90ffe1ca3c57bb (patch) | |
tree | 1a45c0ccfec8f5f7ba37eb4385cdc7f61afa0c97 /lib/csapi/users.cpp | |
parent | f5c2e47fa1ab84fdaffe03c30ba973d7dea5ac05 (diff) | |
parent | 1e6510790dab6b9141ae52993987b406399668cd (diff) | |
download | libquotient-b55334ac0fe89f780776bc4eab90ffe1ca3c57bb.tar.gz libquotient-b55334ac0fe89f780776bc4eab90ffe1ca3c57bb.zip |
Merge branch 'cs-api-0.4.0'
Diffstat (limited to 'lib/csapi/users.cpp')
-rw-r--r-- | lib/csapi/users.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/csapi/users.cpp b/lib/csapi/users.cpp index 408a8cad..deb9cb8a 100644 --- a/lib/csapi/users.cpp +++ b/lib/csapi/users.cpp @@ -16,18 +16,17 @@ namespace QMatrixClient { // Converters - template <> struct FromJson<SearchUserDirectoryJob::User> + template <> struct FromJsonObject<SearchUserDirectoryJob::User> { - SearchUserDirectoryJob::User operator()(const QJsonValue& jv) + SearchUserDirectoryJob::User operator()(const QJsonObject& jo) const { - const auto& _json = jv.toObject(); SearchUserDirectoryJob::User result; result.userId = - fromJson<QString>(_json.value("user_id"_ls)); + fromJson<QString>(jo.value("user_id"_ls)); result.displayName = - fromJson<QString>(_json.value("display_name"_ls)); + fromJson<QString>(jo.value("display_name"_ls)); result.avatarUrl = - fromJson<QString>(_json.value("avatar_url"_ls)); + fromJson<QString>(jo.value("avatar_url"_ls)); return result; } |