diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-31 18:24:53 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-31 18:25:37 +0200 |
commit | 42811660094c88a4a1bfa8bd8ace5f4b148c246a (patch) | |
tree | 36c7c05f16f3643eaabec75d3e231c1e6bf2a61d /lib/csapi/message_pagination.cpp | |
parent | fed831820965ad5654317d5e7df18c23fa75de20 (diff) | |
download | libquotient-42811660094c88a4a1bfa8bd8ace5f4b148c246a.tar.gz libquotient-42811660094c88a4a1bfa8bd8ace5f4b148c246a.zip |
Regenerate API files (FTBFS; see the next commit)
Diffstat (limited to 'lib/csapi/message_pagination.cpp')
-rw-r--r-- | lib/csapi/message_pagination.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/csapi/message_pagination.cpp b/lib/csapi/message_pagination.cpp index 1a93b75b..0b2c99ce 100644 --- a/lib/csapi/message_pagination.cpp +++ b/lib/csapi/message_pagination.cpp @@ -11,7 +11,7 @@ auto queryToGetRoomEvents(const QString& from, const QString& to, const QString& filter) { QUrlQuery _q; - addParam<>(_q, QStringLiteral("from"), from); + addParam<IfNotEmpty>(_q, QStringLiteral("from"), from); addParam<IfNotEmpty>(_q, QStringLiteral("to"), to); addParam<>(_q, QStringLiteral("dir"), dir); addParam<IfNotEmpty>(_q, QStringLiteral("limit"), limit); @@ -20,20 +20,23 @@ auto queryToGetRoomEvents(const QString& from, const QString& to, } QUrl GetRoomEventsJob::makeRequestUrl(QUrl baseUrl, const QString& roomId, - const QString& from, const QString& dir, + const QString& dir, const QString& from, const QString& to, Omittable<int> limit, const QString& filter) { return BaseJob::makeRequestUrl( std::move(baseUrl), - makePath("/_matrix/client/r0", "/rooms/", roomId, "/messages"), + makePath("/_matrix/client/v3", "/rooms/", roomId, "/messages"), queryToGetRoomEvents(from, to, dir, limit, filter)); } -GetRoomEventsJob::GetRoomEventsJob(const QString& roomId, const QString& from, - const QString& dir, const QString& to, +GetRoomEventsJob::GetRoomEventsJob(const QString& roomId, const QString& dir, + const QString& from, const QString& to, Omittable<int> limit, const QString& filter) : BaseJob(HttpVerb::Get, QStringLiteral("GetRoomEventsJob"), - makePath("/_matrix/client/r0", "/rooms/", roomId, "/messages"), + makePath("/_matrix/client/v3", "/rooms/", roomId, "/messages"), queryToGetRoomEvents(from, to, dir, limit, filter)) -{} +{ + addExpectedKey("start"); + addExpectedKey("chunk"); +} |