diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-12 15:04:18 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-12 15:04:18 +0200 |
commit | a831d6f9cd55e33061e748b29cf256ba84ece20d (patch) | |
tree | 35443bf8a5006c6d8498bcd9bad6cb280107eac9 /lib/csapi/space_hierarchy.h | |
parent | 7d4b46e6daf656a1e97426cb1f2f8c99c68c4dda (diff) | |
parent | 9e594bd1d49dc0e1fdb8b74cef11fe3bfa3fdc1e (diff) | |
download | libquotient-a831d6f9cd55e33061e748b29cf256ba84ece20d.tar.gz libquotient-a831d6f9cd55e33061e748b29cf256ba84ece20d.zip |
Merge branch 'kitsune/more-gtad-fixes' into dev
Diffstat (limited to 'lib/csapi/space_hierarchy.h')
-rw-r--r-- | lib/csapi/space_hierarchy.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/csapi/space_hierarchy.h b/lib/csapi/space_hierarchy.h index 5b3c1f80..7a421be8 100644 --- a/lib/csapi/space_hierarchy.h +++ b/lib/csapi/space_hierarchy.h @@ -4,8 +4,7 @@ #pragma once -#include "csapi/../../event-schemas/schema/core-event-schema/stripped_state.h" - +#include "events/eventloader.h" #include "jobs/basejob.h" namespace Quotient { @@ -66,7 +65,7 @@ public: /// added `origin_server_ts` key. /// /// If the room is not a space-room, this should be empty. - QVector<QJsonObject> childrenState; + StateEvents childrenState; }; // Construction/destruction @@ -103,8 +102,8 @@ public: */ explicit GetSpaceHierarchyJob(const QString& roomId, Omittable<bool> suggestedOnly = none, - Omittable<double> limit = none, - Omittable<double> maxDepth = none, + Omittable<int> limit = none, + Omittable<int> maxDepth = none, const QString& from = {}); /*! \brief Construct a URL without creating a full-fledged job object @@ -114,16 +113,16 @@ public: */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, Omittable<bool> suggestedOnly = none, - Omittable<double> limit = none, - Omittable<double> maxDepth = none, + Omittable<int> limit = none, + Omittable<int> maxDepth = none, const QString& from = {}); // Result properties /// The rooms for the current page, with the current filters. - QVector<ChildRoomsChunk> rooms() const + std::vector<ChildRoomsChunk> rooms() { - return loadFromJson<QVector<ChildRoomsChunk>>("rooms"_ls); + return takeFromJson<std::vector<ChildRoomsChunk>>("rooms"_ls); } /// A token to supply to `from` to keep paginating the responses. Not |