diff options
Diffstat (limited to 'lib/csapi/users.cpp')
-rw-r--r-- | lib/csapi/users.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/csapi/users.cpp b/lib/csapi/users.cpp index 48b727f0..c65280ee 100644 --- a/lib/csapi/users.cpp +++ b/lib/csapi/users.cpp @@ -9,12 +9,12 @@ using namespace Quotient; SearchUserDirectoryJob::SearchUserDirectoryJob(const QString& searchTerm, Omittable<int> limit) : BaseJob(HttpVerb::Post, QStringLiteral("SearchUserDirectoryJob"), - makePath("/_matrix/client/r0", "/user_directory/search")) + makePath("/_matrix/client/v3", "/user_directory/search")) { - QJsonObject _data; - addParam<>(_data, QStringLiteral("search_term"), searchTerm); - addParam<IfNotEmpty>(_data, QStringLiteral("limit"), limit); - setRequestData(std::move(_data)); + QJsonObject _dataJson; + addParam<>(_dataJson, QStringLiteral("search_term"), searchTerm); + addParam<IfNotEmpty>(_dataJson, QStringLiteral("limit"), limit); + setRequestData({ _dataJson }); addExpectedKey("results"); addExpectedKey("limited"); } |