aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/csapi/create_room.cpp4
-rw-r--r--lib/csapi/search.cpp2
-rw-r--r--lib/csapi/search.h1
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;