summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/EventStore.cpp6
-rw-r--r--src/timeline/TimelineModel.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp

index b0ea07ec..122a6f8e 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp
@@ -241,9 +241,9 @@ EventStore::EventStore(std::string room_id, QObject *) std::visit( [&pending_event, &original_encrypted, &session, this](auto &msg) { - json doc = {{"type", mtx::events::to_string(msg.type)}, - {"content", json(msg.content)}, - {"room_id", room_id_}}; + nlohmann::json doc = {{"type", mtx::events::to_string(msg.type)}, + {"content", nlohmann::json(msg.content)}, + {"room_id", room_id_}}; auto data = olm::encrypt_group_message_with_session( session.session, http::client()->device_id(), doc); diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 8e9a21db..53d2fe01 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1346,9 +1346,9 @@ TimelineModel::sendEncryptedMessage(mtx::events::RoomEvent<T> msg, mtx::events:: using namespace mtx::events; using namespace mtx::identifiers; - json doc = {{"type", mtx::events::to_string(eventType)}, - {"content", json(msg.content)}, - {"room_id", room_id}}; + nlohmann::json doc = {{"type", mtx::events::to_string(eventType)}, + {"content", nlohmann::json(msg.content)}, + {"room_id", room_id}}; try { mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> event;