aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/users.cpp')
-rw-r--r--lib/csapi/users.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/csapi/users.cpp b/lib/csapi/users.cpp
index e0db6f70..c65280ee 100644
--- a/lib/csapi/users.cpp
+++ b/lib/csapi/users.cpp
@@ -11,10 +11,10 @@ SearchUserDirectoryJob::SearchUserDirectoryJob(const QString& searchTerm,
: BaseJob(HttpVerb::Post, QStringLiteral("SearchUserDirectoryJob"),
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");
}