From 18ea01e198d112de00ac70e1e1c357424706d10a Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 13 Aug 2021 23:13:09 +0200 Subject: Show if there are unverified devices in a room Also fixes some issues where nested transactions will poison the verification cache. --- src/CacheCryptoStructs.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/CacheCryptoStructs.h') diff --git a/src/CacheCryptoStructs.h b/src/CacheCryptoStructs.h index 69d64885..a992fe79 100644 --- a/src/CacheCryptoStructs.h +++ b/src/CacheCryptoStructs.h @@ -112,9 +112,11 @@ struct VerificationStatus //! True, if the users master key is verified crypto::Trust user_verified = crypto::Trust::Unverified; //! List of all devices marked as verified - std::vector verified_devices; + std::set verified_devices; //! Map from sender key/curve25519 to trust status std::map verified_device_keys; + //! Count of unverified devices + int unverified_device_count = 0; }; //! In memory cache of verification status @@ -154,9 +156,9 @@ from_json(const nlohmann::json &j, UserKeyCache &info); struct VerificationCache { //! list of verified device_ids with device-verification - std::vector device_verified; + std::set device_verified; //! list of devices the user blocks - std::vector device_blocked; + std::set device_blocked; }; void -- cgit 1.5.1