diff options
Diffstat (limited to 'lib/csapi/report_content.cpp')
-rw-r--r-- | lib/csapi/report_content.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/csapi/report_content.cpp b/lib/csapi/report_content.cpp new file mode 100644 index 00000000..9d19e012 --- /dev/null +++ b/lib/csapi/report_content.cpp @@ -0,0 +1,24 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + +#include "report_content.h" + +#include "converters.h" + +#include <QtCore/QStringBuilder> + +using namespace QMatrixClient; + +static const auto basePath = QStringLiteral("/_matrix/client/r0"); + +ReportContentJob::ReportContentJob(const QString& roomId, const QString& eventId, int score, const QString& reason) + : BaseJob(HttpVerb::Post, "ReportContentJob", + basePath % "/rooms/" % roomId % "/report/" % eventId) +{ + QJsonObject _data; + addToJson<>(_data, "score", score); + addToJson<>(_data, "reason", reason); + setRequestData(_data); +} + |