From b52f3998a454a18ad46d1f276052965b96cd2ca9 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 4 Jul 2018 19:42:43 +0900 Subject: lib/csapi: Updated from the latest API definitions --- lib/csapi/create_room.cpp | 4 ++-- lib/csapi/search.cpp | 2 ++ 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(_json, QStringLiteral("type"), pod.type); + addParam<>(_json, QStringLiteral("type"), pod.type); addParam(_json, QStringLiteral("state_key"), pod.stateKey); - addParam(_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(_json.value("count"_ls)); + result.highlights = + fromJson(_json.value("highlights"_ls)); result.results = fromJson>(_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 count; + QStringList highlights; std::vector results; std::unordered_map state; QHash> groups; -- cgit v1.2.3