diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-04 19:42:43 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-04 21:34:25 +0900 |
commit | b52f3998a454a18ad46d1f276052965b96cd2ca9 (patch) | |
tree | 45905c9073d95f7961dde6628a7c1aa5da1f8ae4 | |
parent | 6a9de91752dfe75e185bf90ab856367b2c804582 (diff) | |
download | libquotient-b52f3998a454a18ad46d1f276052965b96cd2ca9.tar.gz libquotient-b52f3998a454a18ad46d1f276052965b96cd2ca9.zip |
lib/csapi: Updated from the latest API definitions
-rw-r--r-- | lib/csapi/create_room.cpp | 4 | ||||
-rw-r--r-- | lib/csapi/search.cpp | 2 | ||||
-rw-r--r-- | lib/csapi/search.h | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/csapi/create_room.cpp b/lib/csapi/create_room.cpp index 5600e18a..534f8fdd 100644 --- a/lib/csapi/create_room.cpp +++ b/lib/csapi/create_room.cpp @@ -28,9 +28,9 @@ namespace QMatrixClient QJsonObject toJson(const CreateRoomJob::StateEvent& pod) { QJsonObject _json; - addParam<IfNotEmpty>(_json, QStringLiteral("type"), pod.type); + addParam<>(_json, QStringLiteral("type"), pod.type); addParam<IfNotEmpty>(_json, QStringLiteral("state_key"), pod.stateKey); - addParam<IfNotEmpty>(_json, QStringLiteral("content"), pod.content); + addParam<>(_json, QStringLiteral("content"), pod.content); return _json; } } // namespace QMatrixClient diff --git a/lib/csapi/search.cpp b/lib/csapi/search.cpp index f3adb315..b2e58931 100644 --- a/lib/csapi/search.cpp +++ b/lib/csapi/search.cpp @@ -137,6 +137,8 @@ namespace QMatrixClient SearchJob::ResultRoomEvents result; result.count = fromJson<qint64>(_json.value("count"_ls)); + result.highlights = + fromJson<QStringList>(_json.value("highlights"_ls)); result.results = fromJson<std::vector<SearchJob::Result>>(_json.value("results"_ls)); result.state = diff --git a/lib/csapi/search.h b/lib/csapi/search.h index 572ea6af..7508aa0e 100644 --- a/lib/csapi/search.h +++ b/lib/csapi/search.h @@ -87,6 +87,7 @@ namespace QMatrixClient struct ResultRoomEvents { Omittable<qint64> count; + QStringList highlights; std::vector<Result> results; std::unordered_map<QString, StateEvents> state; QHash<QString, QHash<QString, GroupValue>> groups; |