diff options
author | arawaaa <77910862+arawaaa@users.noreply.github.com> | 2021-12-27 17:35:28 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 17:35:28 -0600 |
commit | 7ec3ba834dd313c4408622da30e04cdc6f4cf7c7 (patch) | |
tree | 679d7dc5939a229ad46676cd1d7aeaea7a25abce /lib/csapi/notifications.cpp | |
parent | 17bf4d180297c7e87363e179b8afa79ddb15dca7 (diff) | |
parent | 674e984e459375974f619d0e778d43a2cc928dc3 (diff) | |
download | libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.tar.gz libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.zip |
Merge branch 'dev' into pinned
Diffstat (limited to 'lib/csapi/notifications.cpp')
-rw-r--r-- | lib/csapi/notifications.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/csapi/notifications.cpp b/lib/csapi/notifications.cpp index a479d500..1e523c6f 100644 --- a/lib/csapi/notifications.cpp +++ b/lib/csapi/notifications.cpp @@ -4,14 +4,12 @@ #include "notifications.h" -#include <QtCore/QStringBuilder> - using namespace Quotient; auto queryToGetNotifications(const QString& from, Omittable<int> limit, const QString& only) { - BaseJob::Query _q; + QUrlQuery _q; addParam<IfNotEmpty>(_q, QStringLiteral("from"), from); addParam<IfNotEmpty>(_q, QStringLiteral("limit"), limit); addParam<IfNotEmpty>(_q, QStringLiteral("only"), only); @@ -23,8 +21,8 @@ QUrl GetNotificationsJob::makeRequestUrl(QUrl baseUrl, const QString& from, const QString& only) { return BaseJob::makeRequestUrl(std::move(baseUrl), - QStringLiteral("/_matrix/client/r0") - % "/notifications", + makePath("/_matrix/client/r0", + "/notifications"), queryToGetNotifications(from, limit, only)); } @@ -32,7 +30,7 @@ GetNotificationsJob::GetNotificationsJob(const QString& from, Omittable<int> limit, const QString& only) : BaseJob(HttpVerb::Get, QStringLiteral("GetNotificationsJob"), - QStringLiteral("/_matrix/client/r0") % "/notifications", + makePath("/_matrix/client/r0", "/notifications"), queryToGetNotifications(from, limit, only)) { addExpectedKey("notifications"); |