summary refs log tree commit diff
path: root/src/ui
diff options
context:
space:
mode:
authorCH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com>2020-08-29 13:37:51 +0530
committerCH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com>2020-08-29 13:37:51 +0530
commit0d1dd29b19a3f4459b036bd63f03c518e000d71f (patch)
tree5e7e400d497fec0326413ac22f12903bce91b019 /src/ui
parentVerify signatures and find trusted devices (diff)
downloadnheko-0d1dd29b19a3f4459b036bd63f03c518e000d71f.tar.xz
Small Fixes
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/UserProfile.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp

index 48a3ffa3..59be3464 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp
@@ -161,16 +161,17 @@ UserProfile::fetchDeviceList(const QString &userID) for (auto sign_key : luk.value().keys) { // checking if the signatures are empty as "at" could // cause exceptions - if (!mk.value().signatures.empty()) { - auto signs = - mk.value().signatures.at(local_user_id); + auto signs = mk->signatures; + if (!signs.empty() && + signs.find(local_user_id) != signs.end()) { + auto sign = signs.at(local_user_id); try { isUserVerified = isUserVerified || (olm::client()->ed25519_verify_sig( sign_key.second, json(mk.value()), - signs.at(sign_key.first))); + sign.at(sign_key.first))); } catch (std::out_of_range) { isUserVerified = isUserVerified || false;