diff options
Diffstat (limited to 'lib/csapi/report_content.cpp')
-rw-r--r-- | lib/csapi/report_content.cpp | 6 |
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)); } |