aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/filter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/filter.cpp')
-rw-r--r--lib/csapi/filter.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/csapi/filter.cpp b/lib/csapi/filter.cpp
index bb3a893f..38c68be7 100644
--- a/lib/csapi/filter.cpp
+++ b/lib/csapi/filter.cpp
@@ -4,16 +4,13 @@
#include "filter.h"
-#include <QtCore/QStringBuilder>
-
using namespace Quotient;
DefineFilterJob::DefineFilterJob(const QString& userId, const Filter& filter)
: BaseJob(HttpVerb::Post, QStringLiteral("DefineFilterJob"),
- QStringLiteral("/_matrix/client/r0") % "/user/" % userId
- % "/filter")
+ makePath("/_matrix/client/r0", "/user/", userId, "/filter"))
{
- setRequestData(Data(toJson(filter)));
+ setRequestData(RequestData(toJson(filter)));
addExpectedKey("filter_id");
}
@@ -21,12 +18,12 @@ QUrl GetFilterJob::makeRequestUrl(QUrl baseUrl, const QString& userId,
const QString& filterId)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- QStringLiteral("/_matrix/client/r0") % "/user/"
- % userId % "/filter/" % filterId);
+ makePath("/_matrix/client/r0", "/user/",
+ userId, "/filter/", filterId));
}
GetFilterJob::GetFilterJob(const QString& userId, const QString& filterId)
: BaseJob(HttpVerb::Get, QStringLiteral("GetFilterJob"),
- QStringLiteral("/_matrix/client/r0") % "/user/" % userId
- % "/filter/" % filterId)
+ makePath("/_matrix/client/r0", "/user/", userId, "/filter/",
+ filterId))
{}