diff options
Diffstat (limited to 'lib/csapi/peeking_events.cpp')
-rw-r--r-- | lib/csapi/peeking_events.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/csapi/peeking_events.cpp b/lib/csapi/peeking_events.cpp index 70a5b6f3..eb5d22fa 100644 --- a/lib/csapi/peeking_events.cpp +++ b/lib/csapi/peeking_events.cpp @@ -4,14 +4,12 @@ #include "peeking_events.h" -#include <QtCore/QStringBuilder> - using namespace Quotient; auto queryToPeekEvents(const QString& from, Omittable<int> timeout, const QString& roomId) { - BaseJob::Query _q; + QUrlQuery _q; addParam<IfNotEmpty>(_q, QStringLiteral("from"), from); addParam<IfNotEmpty>(_q, QStringLiteral("timeout"), timeout); addParam<IfNotEmpty>(_q, QStringLiteral("room_id"), roomId); @@ -22,14 +20,13 @@ QUrl PeekEventsJob::makeRequestUrl(QUrl baseUrl, const QString& from, Omittable<int> timeout, const QString& roomId) { return BaseJob::makeRequestUrl(std::move(baseUrl), - QStringLiteral("/_matrix/client/r0") - % "/events", + makePath("/_matrix/client/r0", "/events"), queryToPeekEvents(from, timeout, roomId)); } PeekEventsJob::PeekEventsJob(const QString& from, Omittable<int> timeout, const QString& roomId) : BaseJob(HttpVerb::Get, QStringLiteral("PeekEventsJob"), - QStringLiteral("/_matrix/client/r0") % "/events", + makePath("/_matrix/client/r0", "/events"), queryToPeekEvents(from, timeout, roomId)) {} |