diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-08-10 08:18:17 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-10-10 20:46:01 +0200 |
commit | 01103222dc59526b37d594b93b0b1cd7473e3f6f (patch) | |
tree | 8e3b679377571fd9b9014afbe62eeba6249d42e2 /lib/csapi/leaving.cpp | |
parent | 4f08c88d234119c2a76874ebd2b1433b81992427 (diff) | |
parent | 7b516cdf0b987e542b1e4cd4556ecb2bfbde3ff9 (diff) | |
download | libquotient-01103222dc59526b37d594b93b0b1cd7473e3f6f.tar.gz libquotient-01103222dc59526b37d594b93b0b1cd7473e3f6f.zip |
Merge branch 'master' into kitsune-fix-read-receipts-and-markers
Diffstat (limited to 'lib/csapi/leaving.cpp')
-rw-r--r-- | lib/csapi/leaving.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/csapi/leaving.cpp b/lib/csapi/leaving.cpp index f4c5f120..0e5386be 100644 --- a/lib/csapi/leaving.cpp +++ b/lib/csapi/leaving.cpp @@ -4,14 +4,11 @@ #include "leaving.h" -#include <QtCore/QStringBuilder> - using namespace Quotient; LeaveRoomJob::LeaveRoomJob(const QString& roomId, const QString& reason) : BaseJob(HttpVerb::Post, QStringLiteral("LeaveRoomJob"), - QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId - % "/leave") + makePath("/_matrix/client/r0", "/rooms/", roomId, "/leave")) { QJsonObject _data; addParam<IfNotEmpty>(_data, QStringLiteral("reason"), reason); @@ -21,12 +18,11 @@ LeaveRoomJob::LeaveRoomJob(const QString& roomId, const QString& reason) QUrl ForgetRoomJob::makeRequestUrl(QUrl baseUrl, const QString& roomId) { return BaseJob::makeRequestUrl(std::move(baseUrl), - QStringLiteral("/_matrix/client/r0") - % "/rooms/" % roomId % "/forget"); + makePath("/_matrix/client/r0", "/rooms/", + roomId, "/forget")); } ForgetRoomJob::ForgetRoomJob(const QString& roomId) : BaseJob(HttpVerb::Post, QStringLiteral("ForgetRoomJob"), - QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId - % "/forget") + makePath("/_matrix/client/r0", "/rooms/", roomId, "/forget")) {} |