Skip to content

Commit

Permalink
Change the commit hash for mtxclient
Browse files Browse the repository at this point in the history
  • Loading branch information
Chethan2k1 committed May 17, 2020
1 parent 2e9c6a4 commit c4a0a85
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ChatPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ ChatPage::trySync()

// TODO: fine grained error handling
try {
cache::saveState(res);
cache::saveState(res);
olm::handle_to_device_messages(res.to_device.events);

emit syncUI(res.rooms);
Expand Down
18 changes: 17 additions & 1 deletion src/Olm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ handle_to_device_messages(const std::vector<mtx::events::collections::DeviceEven
nlohmann::json j_msg;

for (const auto &msg : msgs) {
j_msg = std::visit([](auto &e){ return json(e); },std::move(msg));
j_msg = std::visit([](auto &e) { return json(e); }, std::move(msg));
if (j_msg.count("type") == 0) {
nhlog::crypto()->warn("received message with no type field: {}",
j_msg.dump(2));
Expand All @@ -49,6 +49,7 @@ handle_to_device_messages(const std::vector<mtx::events::collections::DeviceEven
nhlog::crypto()->warn(
"parsing error for olm message: {} {}", e.what(), j_msg.dump(2));
} catch (const std::invalid_argument &e) {
<<<<<<< HEAD
<<<<<<< HEAD
nhlog::crypto()->warn("validation error for olm message: {} {}",
e.what(),
Expand All @@ -57,6 +58,11 @@ handle_to_device_messages(const std::vector<mtx::events::collections::DeviceEven
nhlog::crypto()->warn(
"validation error for olm message: {} {}", e.what(), j_msg.dump(2));
>>>>>>> minor fixes
=======
nhlog::crypto()->warn("validation error for olm message: {} {}",
e.what(),
j_msg.dump(2));
>>>>>>> Change the commit hash for mtxclient
}

} else if (msg_type == to_string(mtx::events::EventType::RoomKeyRequest)) {
Expand Down Expand Up @@ -370,12 +376,17 @@ handle_key_request_message(const mtx::events::DeviceEvent<mtx::events::msg::KeyR

// Check if we have the keys for the requested session.
if (!cache::outboundMegolmSessionExists(req.content.room_id)) {
<<<<<<< HEAD
<<<<<<< HEAD
nhlog::crypto()->warn("requested session not found in room: {}",
req.content.room_id);
=======
nhlog::crypto()->warn("requested session not found in room: {}", req.content.room_id);
>>>>>>> minor fixes
=======
nhlog::crypto()->warn("requested session not found in room: {}",
req.content.room_id);
>>>>>>> Change the commit hash for mtxclient
return;
}

Expand All @@ -398,12 +409,17 @@ handle_key_request_message(const mtx::events::DeviceEvent<mtx::events::msg::KeyR
}

if (!utils::respondsToKeyRequests(req.content.room_id)) {
<<<<<<< HEAD
<<<<<<< HEAD
nhlog::crypto()->debug("ignoring all key requests for room {}",
req.content.room_id);
=======
nhlog::crypto()->debug("ignoring all key requests for room {}", req.content.room_id);
>>>>>>> minor fixes
=======
nhlog::crypto()->debug("ignoring all key requests for room {}",
req.content.room_id);
>>>>>>> Change the commit hash for mtxclient
return;
}

Expand Down

0 comments on commit c4a0a85

Please sign in to comment.