diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-06-19 15:01:33 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-06-19 15:03:24 +0200 |
commit | e17764a1ae81393968dfb747c7b67353c109bc71 (patch) | |
tree | bbff0707ae3622e22c67d0cc310370eb5126ac7e /lib/csapi/users.h | |
parent | cbd107e595bbb78ef3411a4a92f66d495c6fc5b4 (diff) | |
download | libquotient-e17764a1ae81393968dfb747c7b67353c109bc71.tar.gz libquotient-e17764a1ae81393968dfb747c7b67353c109bc71.zip |
csapi/: generated using the latest GTAD and matrix-doc
For matrix-doc, specifically, it is master (5cb4b086) merged with
https://github.com/matrix-org/matrix-doc/pull/2518.
Diffstat (limited to 'lib/csapi/users.h')
-rw-r--r-- | lib/csapi/users.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/csapi/users.h b/lib/csapi/users.h index adb2a33d..6fc26f57 100644 --- a/lib/csapi/users.h +++ b/lib/csapi/users.h @@ -35,7 +35,7 @@ public: /// The search is performed case-insensitively on user IDs and display /// names preferably using a collation determined based upon the /// ``Accept-Language`` header provided in the request, if present. - struct SearchUserDirectory200ThirdPartyUser { + struct User { /// The user's matrix user ID. QString userId; /// The display name of the user, if one exists. @@ -48,7 +48,6 @@ public: /*! \brief Searches the user directory. * - * * \param searchTerm * The term to search for * @@ -61,10 +60,9 @@ public: // Result properties /// Ordered by rank and then whether or not profile info is available. - QVector<SearchUserDirectory200ThirdPartyUser> results() const + QVector<User> results() const { - return loadFromJson<QVector<SearchUserDirectory200ThirdPartyUser>>( - "results"_ls); + return loadFromJson<QVector<User>>("results"_ls); } /// Indicates if the result list has been truncated by the limit. @@ -72,11 +70,9 @@ public: }; template <> -struct JsonObjectConverter< - SearchUserDirectoryJob::SearchUserDirectory200ThirdPartyUser> { - static void - fillFrom(const QJsonObject& jo, - SearchUserDirectoryJob::SearchUserDirectory200ThirdPartyUser& result) +struct JsonObjectConverter<SearchUserDirectoryJob::User> { + static void fillFrom(const QJsonObject& jo, + SearchUserDirectoryJob::User& result) { fromJson(jo.value("user_id"_ls), result.userId); fromJson(jo.value("display_name"_ls), result.displayName); |