aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/report_content.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/report_content.cpp
parent65e6ecd9711372e1e2afde769967ee46b3920307 (diff)
downloadlibquotient-0d4315008374d9a4dfb11f934875b1a16670ec74.tar.gz
libquotient-0d4315008374d9a4dfb11f934875b1a16670ec74.zip
Re-generate API files
Diffstat (limited to 'lib/csapi/report_content.cpp')
-rw-r--r--lib/csapi/report_content.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/csapi/report_content.cpp b/lib/csapi/report_content.cpp
index 0a41625f..ea906380 100644
--- a/lib/csapi/report_content.cpp
+++ b/lib/csapi/report_content.cpp
@@ -9,13 +9,13 @@
using namespace Quotient;
ReportContentJob::ReportContentJob(const QString& roomId, const QString& eventId,
- int score, const QString& reason)
+ Omittable<int> score, const QString& reason)
: BaseJob(HttpVerb::Post, QStringLiteral("ReportContentJob"),
QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
% "/report/" % eventId)
{
QJsonObject _data;
- addParam<>(_data, QStringLiteral("score"), score);
- addParam<>(_data, QStringLiteral("reason"), reason);
+ addParam<IfNotEmpty>(_data, QStringLiteral("score"), score);
+ addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason);
setRequestData(std::move(_data));
}