aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/banning.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-23 19:12:38 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-06-23 19:12:38 +0200
commit0d4315008374d9a4dfb11f934875b1a16670ec74 (patch)
tree4327eecbf44d79152ac02a37c64bab402b22a8af /lib/csapi/banning.cpp
parent65e6ecd9711372e1e2afde769967ee46b3920307 (diff)
downloadlibquotient-0d4315008374d9a4dfb11f934875b1a16670ec74.tar.gz
libquotient-0d4315008374d9a4dfb11f934875b1a16670ec74.zip
Re-generate API files
Diffstat (limited to 'lib/csapi/banning.cpp')
-rw-r--r--lib/csapi/banning.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/csapi/banning.cpp b/lib/csapi/banning.cpp
index 8a8ec664..8e0add1a 100644
--- a/lib/csapi/banning.cpp
+++ b/lib/csapi/banning.cpp
@@ -19,12 +19,14 @@ BanJob::BanJob(const QString& roomId, const QString& userId,
setRequestData(std::move(_data));
}
-UnbanJob::UnbanJob(const QString& roomId, const QString& userId)
+UnbanJob::UnbanJob(const QString& roomId, const QString& userId,
+ const QString& reason)
: BaseJob(HttpVerb::Post, QStringLiteral("UnbanJob"),
QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
% "/unban")
{
QJsonObject _data;
addParam<>(_data, QStringLiteral("user_id"), userId);
+ addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason);
setRequestData(std::move(_data));
}