diff options
Diffstat (limited to 'lib/csapi/kicking.cpp')
-rw-r--r-- | lib/csapi/kicking.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/csapi/kicking.cpp b/lib/csapi/kicking.cpp index 1d6d5543..7de5ce01 100644 --- a/lib/csapi/kicking.cpp +++ b/lib/csapi/kicking.cpp @@ -4,23 +4,17 @@ #include "kicking.h" -#include "converters.h" - #include <QtCore/QStringBuilder> -using namespace QMatrixClient; - -static const auto basePath = QStringLiteral("/_matrix/client/r0"); +using namespace Quotient; -static const auto KickJobName = QStringLiteral("KickJob"); - -KickJob::KickJob(const QString& roomId, const QString& userId, const QString& reason) - : BaseJob(HttpVerb::Post, KickJobName, - basePath % "/rooms/" % roomId % "/kick") +KickJob::KickJob(const QString& roomId, const QString& userId, + const QString& reason) + : BaseJob(HttpVerb::Post, QStringLiteral("KickJob"), + QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId % "/kick") { QJsonObject _data; addParam<>(_data, QStringLiteral("user_id"), userId); addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason); - setRequestData(_data); + setRequestData(std::move(_data)); } - |