aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/leaving.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/leaving.cpp')
-rw-r--r--lib/csapi/leaving.cpp33
1 files changed, 13 insertions, 20 deletions
diff --git a/lib/csapi/leaving.cpp b/lib/csapi/leaving.cpp
index 09e5f83b..8bd170bf 100644
--- a/lib/csapi/leaving.cpp
+++ b/lib/csapi/leaving.cpp
@@ -4,39 +4,32 @@
#include "leaving.h"
-#include "converters.h"
-
#include <QtCore/QStringBuilder>
-using namespace QMatrixClient;
-
-static const auto basePath = QStringLiteral("/_matrix/client/r0");
+using namespace Quotient;
QUrl LeaveRoomJob::makeRequestUrl(QUrl baseUrl, const QString& roomId)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/rooms/" % roomId % "/leave");
+ QStringLiteral("/_matrix/client/r0")
+ % "/rooms/" % roomId % "/leave");
}
-static const auto LeaveRoomJobName = QStringLiteral("LeaveRoomJob");
-
LeaveRoomJob::LeaveRoomJob(const QString& roomId)
- : BaseJob(HttpVerb::Post, LeaveRoomJobName,
- basePath % "/rooms/" % roomId % "/leave")
-{
-}
+ : BaseJob(HttpVerb::Post, QStringLiteral("LeaveRoomJob"),
+ QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
+ % "/leave")
+{}
QUrl ForgetRoomJob::makeRequestUrl(QUrl baseUrl, const QString& roomId)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/rooms/" % roomId % "/forget");
+ QStringLiteral("/_matrix/client/r0")
+ % "/rooms/" % roomId % "/forget");
}
-static const auto ForgetRoomJobName = QStringLiteral("ForgetRoomJob");
-
ForgetRoomJob::ForgetRoomJob(const QString& roomId)
- : BaseJob(HttpVerb::Post, ForgetRoomJobName,
- basePath % "/rooms/" % roomId % "/forget")
-{
-}
-
+ : BaseJob(HttpVerb::Post, QStringLiteral("ForgetRoomJob"),
+ QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
+ % "/forget")
+{}