aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/third_party_membership.cpp
diff options
context:
space:
mode:
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));
}
-