diff options
Diffstat (limited to 'lib/csapi/message_pagination.cpp')
-rw-r--r-- | lib/csapi/message_pagination.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/csapi/message_pagination.cpp b/lib/csapi/message_pagination.cpp index 855c051f..1a93b75b 100644 --- a/lib/csapi/message_pagination.cpp +++ b/lib/csapi/message_pagination.cpp @@ -4,15 +4,13 @@ #include "message_pagination.h" -#include <QtCore/QStringBuilder> - using namespace Quotient; auto queryToGetRoomEvents(const QString& from, const QString& to, const QString& dir, Omittable<int> limit, const QString& filter) { - BaseJob::Query _q; + QUrlQuery _q; addParam<>(_q, QStringLiteral("from"), from); addParam<IfNotEmpty>(_q, QStringLiteral("to"), to); addParam<>(_q, QStringLiteral("dir"), dir); @@ -28,7 +26,7 @@ QUrl GetRoomEventsJob::makeRequestUrl(QUrl baseUrl, const QString& roomId, { return BaseJob::makeRequestUrl( std::move(baseUrl), - QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId % "/messages", + makePath("/_matrix/client/r0", "/rooms/", roomId, "/messages"), queryToGetRoomEvents(from, to, dir, limit, filter)); } @@ -36,7 +34,6 @@ GetRoomEventsJob::GetRoomEventsJob(const QString& roomId, const QString& from, const QString& dir, const QString& to, Omittable<int> limit, const QString& filter) : BaseJob(HttpVerb::Get, QStringLiteral("GetRoomEventsJob"), - QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId - % "/messages", + makePath("/_matrix/client/r0", "/rooms/", roomId, "/messages"), queryToGetRoomEvents(from, to, dir, limit, filter)) {} |