aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/users.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/users.h')
-rw-r--r--lib/csapi/users.h16
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);