summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-08-31 16:40:31 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-08-31 16:40:31 +0200
commit98533f01d9f39d19d04841a079b6ebe9284559f8 (patch)
treeca70c70239ccabdbf851184f670ee6d3af883b67 /src/Cache.cpp
parentRemove useless ; (diff)
downloadnheko-98533f01d9f39d19d04841a079b6ebe9284559f8.tar.xz
Fix session always being rotated if 'verified only' is active
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index ed6a5f34..a7fe473f 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -3759,7 +3759,8 @@ Cache::getMembersWithKeys(const std::string &room_id, bool verified_only)
                         if (res) {
                                 auto k = json::parse(keys).get<UserKeyCache>();
                                 if (verified_only) {
-                                        auto verif = verificationStatus(std::string(user_id));
+                                        auto verif = verificationStatus_(std::string(user_id), txn);
+
                                         if (verif.user_verified == crypto::Trust::Verified ||
                                             !verif.verified_devices.empty()) {
                                                 auto keyCopy = k;
@@ -3807,7 +3808,8 @@ Cache::getMembersWithKeys(const std::string &room_id, bool verified_only)
                 cursor.close();
 
                 return members;
-        } catch (std::exception &) {
+        } catch (std::exception &e) {
+                nhlog::db()->debug("Error retrieving members: {}", e.what());
                 return {};
         }
 }