mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Change the commit hash for mtxclient
This commit is contained in:
parent
30d61e3114
commit
e4a7e85935
4 changed files with 12 additions and 9 deletions
|
@ -337,7 +337,7 @@ if(USE_BUNDLED_MTXCLIENT)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
MatrixClient
|
MatrixClient
|
||||||
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
||||||
GIT_TAG 71bd56b66cf634341ffef804f07d33f01fd57c25
|
GIT_TAG dfc39651ac02b48787b9d4e27932ef2feceb162c
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(MatrixClient)
|
FetchContent_MakeAvailable(MatrixClient)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -146,9 +146,9 @@
|
||||||
"name": "mtxclient",
|
"name": "mtxclient",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"sha256": "7055f1459a43a12f27f949564624f13cc593ac894e445e6de0e6563ad38ebc3e",
|
"sha256": "4f859cdcb42b052ed07d55ac8890e9051fa49a1e8bc43648106ddce351b6868b",
|
||||||
"type": "archive",
|
"type": "archive",
|
||||||
"url": "https://github.com/Nheko-Reborn/mtxclient/archive/71bd56b66cf634341ffef804f07d33f01fd57c25.tar.gz"
|
"url": "https://github.com/Nheko-Reborn/mtxclient/archive/dfc39651ac02b48787b9d4e27932ef2feceb162c.tar.gz"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ ChatPage::trySync()
|
||||||
|
|
||||||
// TODO: fine grained error handling
|
// TODO: fine grained error handling
|
||||||
try {
|
try {
|
||||||
cache::saveState(res);
|
cache::saveState(res);
|
||||||
olm::handle_to_device_messages(res.to_device.events);
|
olm::handle_to_device_messages(res.to_device.events);
|
||||||
|
|
||||||
auto updates = cache::roomUpdates(res);
|
auto updates = cache::roomUpdates(res);
|
||||||
|
|
13
src/Olm.cpp
13
src/Olm.cpp
|
@ -32,7 +32,7 @@ handle_to_device_messages(const std::vector<mtx::events::collections::DeviceEven
|
||||||
nlohmann::json j_msg;
|
nlohmann::json j_msg;
|
||||||
|
|
||||||
for (const auto &msg : msgs) {
|
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) {
|
if (j_msg.count("type") == 0) {
|
||||||
nhlog::crypto()->warn("received message with no type field: {}",
|
nhlog::crypto()->warn("received message with no type field: {}",
|
||||||
j_msg.dump(2));
|
j_msg.dump(2));
|
||||||
|
@ -49,8 +49,9 @@ handle_to_device_messages(const std::vector<mtx::events::collections::DeviceEven
|
||||||
nhlog::crypto()->warn(
|
nhlog::crypto()->warn(
|
||||||
"parsing error for olm message: {} {}", e.what(), j_msg.dump(2));
|
"parsing error for olm message: {} {}", e.what(), j_msg.dump(2));
|
||||||
} catch (const std::invalid_argument &e) {
|
} catch (const std::invalid_argument &e) {
|
||||||
nhlog::crypto()->warn(
|
nhlog::crypto()->warn("validation error for olm message: {} {}",
|
||||||
"validation error for olm message: {} {}", e.what(), j_msg.dump(2));
|
e.what(),
|
||||||
|
j_msg.dump(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (msg_type == to_string(mtx::events::EventType::RoomKeyRequest)) {
|
} else if (msg_type == to_string(mtx::events::EventType::RoomKeyRequest)) {
|
||||||
|
@ -364,7 +365,8 @@ handle_key_request_message(const mtx::events::DeviceEvent<mtx::events::msg::KeyR
|
||||||
|
|
||||||
// Check if we have the keys for the requested session.
|
// Check if we have the keys for the requested session.
|
||||||
if (!cache::outboundMegolmSessionExists(req.content.room_id)) {
|
if (!cache::outboundMegolmSessionExists(req.content.room_id)) {
|
||||||
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);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,7 +389,8 @@ handle_key_request_message(const mtx::events::DeviceEvent<mtx::events::msg::KeyR
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!utils::respondsToKeyRequests(req.content.room_id)) {
|
if (!utils::respondsToKeyRequests(req.content.room_id)) {
|
||||||
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);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue