aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/third_party_membership.cpp
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
committerAndres Salomon <dilinger@queued.net>2021-01-18 04:00:14 -0500
commit09eb39236666e81d5da014acea011dcd74d0999b (patch)
tree52876d96be71be1a39d5d935c1295a51995e8949 /lib/csapi/third_party_membership.cpp
parentf1788ee27f33e9339334e0d79bde9a27d9ce2e44 (diff)
parenta4e78956f105875625b572d8b98459ffa86fafe5 (diff)
downloadlibquotient-09eb39236666e81d5da014acea011dcd74d0999b.tar.gz
libquotient-09eb39236666e81d5da014acea011dcd74d0999b.zip
Update upstream source from tag 'upstream/0.6.4'
Update to upstream version '0.6.4' with Debian dir aa8705fd74743e79c043bc9e3e425d5064404cfe
Diffstat (limited to 'lib/csapi/third_party_membership.cpp')
-rw-r--r--lib/csapi/third_party_membership.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/csapi/third_party_membership.cpp b/lib/csapi/third_party_membership.cpp
index c1683338..fda772d2 100644
--- a/lib/csapi/third_party_membership.cpp
+++ b/lib/csapi/third_party_membership.cpp
@@ -4,24 +4,21 @@
#include "third_party_membership.h"
-#include "converters.h"
-
#include <QtCore/QStringBuilder>
-using namespace QMatrixClient;
-
-static const auto basePath = QStringLiteral("/_matrix/client/r0");
+using namespace Quotient;
-static const auto InviteBy3PIDJobName = QStringLiteral("InviteBy3PIDJob");
-
-InviteBy3PIDJob::InviteBy3PIDJob(const QString& roomId, const QString& idServer, const QString& medium, const QString& address)
- : BaseJob(HttpVerb::Post, InviteBy3PIDJobName,
- basePath % "/rooms/" % roomId % "/invite")
+InviteBy3PIDJob::InviteBy3PIDJob(const QString& roomId, const QString& idServer,
+ const QString& idAccessToken,
+ const QString& medium, const QString& address)
+ : BaseJob(HttpVerb::Post, QStringLiteral("InviteBy3PIDJob"),
+ QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
+ % "/invite")
{
QJsonObject _data;
addParam<>(_data, QStringLiteral("id_server"), idServer);
+ addParam<>(_data, QStringLiteral("id_access_token"), idAccessToken);
addParam<>(_data, QStringLiteral("medium"), medium);
addParam<>(_data, QStringLiteral("address"), address);
- setRequestData(_data);
+ setRequestData(std::move(_data));
}
-