summary refs log tree commit diff
path: root/src/encryption
diff options
context:
space:
mode:
Diffstat (limited to 'src/encryption')
-rw-r--r--src/encryption/Olm.cpp6
-rw-r--r--src/encryption/SelfVerificationStatus.cpp2
-rw-r--r--src/encryption/VerificationManager.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/encryption/Olm.cpp b/src/encryption/Olm.cpp

index b8df73fc..0004a40c 100644 --- a/src/encryption/Olm.cpp +++ b/src/encryption/Olm.cpp
@@ -273,7 +273,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey } bool from_their_device = false; - for (auto [device_id, key] : otherUserDeviceKeys.device_keys) { + for (const auto &[device_id, key] : otherUserDeviceKeys.device_keys) { auto c_key = key.keys.find("curve25519:" + device_id); auto e_key = key.keys.find("ed25519:" + device_id); @@ -406,7 +406,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey if (failed_decryption) { try { std::map<std::string, std::vector<std::string>> targets; - for (auto [device_id, key] : otherUserDeviceKeys.device_keys) { + for (const auto &[device_id, key] : otherUserDeviceKeys.device_keys) { if (key.keys.at("curve25519:" + device_id) == msg.sender_key) targets[msg.sender].push_back(device_id); } @@ -1522,7 +1522,7 @@ request_cross_signing_keys() } // timeout after 15 min - QTimer::singleShot(15 * 60 * 1000, [secretRequest, body]() { + QTimer::singleShot(15 * 60 * 1000, ChatPage::instance(), [secretRequest, body]() { if (request_id_to_secret_name.count(secretRequest.request_id)) { request_id_to_secret_name.erase(secretRequest.request_id); http::client()->send_to_device<mtx::events::msg::SecretRequest>( diff --git a/src/encryption/SelfVerificationStatus.cpp b/src/encryption/SelfVerificationStatus.cpp
index 1e278da1..e15fa4cc 100644 --- a/src/encryption/SelfVerificationStatus.cpp +++ b/src/encryption/SelfVerificationStatus.cpp
@@ -280,7 +280,7 @@ SelfVerificationStatus::invalidate() cache::client()->markUserKeysOutOfDate({http::client()->user_id().to_string()}); - QTimer::singleShot(1'000, [] { + QTimer::singleShot(1'000, this, [] { cache::client()->query_keys(http::client()->user_id().to_string(), [](const UserKeyCache &, mtx::http::RequestErr) {}); }); diff --git a/src/encryption/VerificationManager.cpp b/src/encryption/VerificationManager.cpp
index f4c7ddf2..163c0564 100644 --- a/src/encryption/VerificationManager.cpp +++ b/src/encryption/VerificationManager.cpp
@@ -79,7 +79,7 @@ VerificationManager::verifyUser(QString userid) auto joined_rooms = cache::joinedRooms(); auto room_infos = cache::getRoomInfo(joined_rooms); - for (std::string room_id : joined_rooms) { + for (const std::string &room_id : joined_rooms) { if ((room_infos[QString::fromStdString(room_id)].member_count == 2) && cache::isRoomEncrypted(room_id)) { auto room_members = cache::roomMembers(room_id);