diff options
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; } |