diff options
Diffstat (limited to 'lib/csapi/administrative_contact.cpp')
-rw-r--r-- | lib/csapi/administrative_contact.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/csapi/administrative_contact.cpp b/lib/csapi/administrative_contact.cpp index f52e2e1f..aa55d934 100644 --- a/lib/csapi/administrative_contact.cpp +++ b/lib/csapi/administrative_contact.cpp @@ -21,9 +21,9 @@ Post3PIDsJob::Post3PIDsJob(const ThreePidCredentials& threePidCreds) : BaseJob(HttpVerb::Post, QStringLiteral("Post3PIDsJob"), makePath("/_matrix/client/v3", "/account/3pid")) { - QJsonObject _data; - addParam<>(_data, QStringLiteral("three_pid_creds"), threePidCreds); - setRequestData(std::move(_data)); + QJsonObject _dataJson; + addParam<>(_dataJson, QStringLiteral("three_pid_creds"), threePidCreds); + setRequestData({ _dataJson }); } Add3PIDJob::Add3PIDJob(const QString& clientSecret, const QString& sid, @@ -31,11 +31,11 @@ Add3PIDJob::Add3PIDJob(const QString& clientSecret, const QString& sid, : BaseJob(HttpVerb::Post, QStringLiteral("Add3PIDJob"), makePath("/_matrix/client/v3", "/account/3pid/add")) { - QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("auth"), auth); - addParam<>(_data, QStringLiteral("client_secret"), clientSecret); - addParam<>(_data, QStringLiteral("sid"), sid); - setRequestData(std::move(_data)); + QJsonObject _dataJson; + addParam<IfNotEmpty>(_dataJson, QStringLiteral("auth"), auth); + addParam<>(_dataJson, QStringLiteral("client_secret"), clientSecret); + addParam<>(_dataJson, QStringLiteral("sid"), sid); + setRequestData({ _dataJson }); } Bind3PIDJob::Bind3PIDJob(const QString& clientSecret, const QString& idServer, @@ -43,12 +43,12 @@ Bind3PIDJob::Bind3PIDJob(const QString& clientSecret, const QString& idServer, : BaseJob(HttpVerb::Post, QStringLiteral("Bind3PIDJob"), makePath("/_matrix/client/v3", "/account/3pid/bind")) { - QJsonObject _data; - addParam<>(_data, QStringLiteral("client_secret"), clientSecret); - addParam<>(_data, QStringLiteral("id_server"), idServer); - addParam<>(_data, QStringLiteral("id_access_token"), idAccessToken); - addParam<>(_data, QStringLiteral("sid"), sid); - setRequestData(std::move(_data)); + QJsonObject _dataJson; + addParam<>(_dataJson, QStringLiteral("client_secret"), clientSecret); + addParam<>(_dataJson, QStringLiteral("id_server"), idServer); + addParam<>(_dataJson, QStringLiteral("id_access_token"), idAccessToken); + addParam<>(_dataJson, QStringLiteral("sid"), sid); + setRequestData({ _dataJson }); } Delete3pidFromAccountJob::Delete3pidFromAccountJob(const QString& medium, @@ -57,11 +57,11 @@ Delete3pidFromAccountJob::Delete3pidFromAccountJob(const QString& medium, : BaseJob(HttpVerb::Post, QStringLiteral("Delete3pidFromAccountJob"), makePath("/_matrix/client/v3", "/account/3pid/delete")) { - QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("id_server"), idServer); - addParam<>(_data, QStringLiteral("medium"), medium); - addParam<>(_data, QStringLiteral("address"), address); - setRequestData(std::move(_data)); + QJsonObject _dataJson; + addParam<IfNotEmpty>(_dataJson, QStringLiteral("id_server"), idServer); + addParam<>(_dataJson, QStringLiteral("medium"), medium); + addParam<>(_dataJson, QStringLiteral("address"), address); + setRequestData({ _dataJson }); addExpectedKey("id_server_unbind_result"); } @@ -71,11 +71,11 @@ Unbind3pidFromAccountJob::Unbind3pidFromAccountJob(const QString& medium, : BaseJob(HttpVerb::Post, QStringLiteral("Unbind3pidFromAccountJob"), makePath("/_matrix/client/v3", "/account/3pid/unbind")) { - QJsonObject _data; - addParam<IfNotEmpty>(_data, QStringLiteral("id_server"), idServer); - addParam<>(_data, QStringLiteral("medium"), medium); - addParam<>(_data, QStringLiteral("address"), address); - setRequestData(std::move(_data)); + QJsonObject _dataJson; + addParam<IfNotEmpty>(_dataJson, QStringLiteral("id_server"), idServer); + addParam<>(_dataJson, QStringLiteral("medium"), medium); + addParam<>(_dataJson, QStringLiteral("address"), address); + setRequestData({ _dataJson }); addExpectedKey("id_server_unbind_result"); } @@ -86,7 +86,7 @@ RequestTokenTo3PIDEmailJob::RequestTokenTo3PIDEmailJob( "/account/3pid/email/requestToken"), false) { - setRequestData(RequestData(toJson(body))); + setRequestData({ toJson(body) }); } RequestTokenTo3PIDMSISDNJob::RequestTokenTo3PIDMSISDNJob( @@ -96,5 +96,5 @@ RequestTokenTo3PIDMSISDNJob::RequestTokenTo3PIDMSISDNJob( "/account/3pid/msisdn/requestToken"), false) { - setRequestData(RequestData(toJson(body))); + setRequestData({ toJson(body) }); } |