diff options
Diffstat (limited to 'lib/csapi/read_markers.cpp')
-rw-r--r-- | lib/csapi/read_markers.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/csapi/read_markers.cpp b/lib/csapi/read_markers.cpp index 1bc67ba0..39e4d148 100644 --- a/lib/csapi/read_markers.cpp +++ b/lib/csapi/read_markers.cpp @@ -4,23 +4,19 @@ #include "read_markers.h" -#include "converters.h" - #include <QtCore/QStringBuilder> -using namespace QMatrixClient; - -static const auto basePath = QStringLiteral("/_matrix/client/r0"); +using namespace Quotient; -static const auto SetReadMarkerJobName = QStringLiteral("SetReadMarkerJob"); - -SetReadMarkerJob::SetReadMarkerJob(const QString& roomId, const QString& mFullyRead, const QString& mRead) - : BaseJob(HttpVerb::Post, SetReadMarkerJobName, - basePath % "/rooms/" % roomId % "/read_markers") +SetReadMarkerJob::SetReadMarkerJob(const QString& roomId, + const QString& mFullyRead, + const QString& mRead) + : BaseJob(HttpVerb::Post, QStringLiteral("SetReadMarkerJob"), + QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId + % "/read_markers") { QJsonObject _data; addParam<>(_data, QStringLiteral("m.fully_read"), mFullyRead); addParam<IfNotEmpty>(_data, QStringLiteral("m.read"), mRead); - setRequestData(_data); + setRequestData(std::move(_data)); } - |