aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/inviting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/inviting.cpp')
-rw-r--r--lib/csapi/inviting.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/csapi/inviting.cpp b/lib/csapi/inviting.cpp
index 01620f9e..1e2554f4 100644
--- a/lib/csapi/inviting.cpp
+++ b/lib/csapi/inviting.cpp
@@ -8,12 +8,14 @@
using namespace Quotient;
-InviteUserJob::InviteUserJob(const QString& roomId, const QString& userId)
+InviteUserJob::InviteUserJob(const QString& roomId, const QString& userId,
+ const QString& reason)
: BaseJob(HttpVerb::Post, QStringLiteral("InviteUserJob"),
QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
% "/invite")
{
QJsonObject _data;
addParam<>(_data, QStringLiteral("user_id"), userId);
+ addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason);
setRequestData(std::move(_data));
}