From 7a949d762efe68ee2b87af4b0ce1d46521cdfb7a Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 10 Oct 2024 10:57:09 +0200 Subject: [PATCH] crypto-ffi: Expose `has_verification_violation` for `UserIdentity` --- bindings/matrix-sdk-crypto-ffi/src/users.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/matrix-sdk-crypto-ffi/src/users.rs b/bindings/matrix-sdk-crypto-ffi/src/users.rs index dfffd9fe546..4f5f54ea85e 100644 --- a/bindings/matrix-sdk-crypto-ffi/src/users.rs +++ b/bindings/matrix-sdk-crypto-ffi/src/users.rs @@ -18,6 +18,8 @@ pub enum UserIdentity { user_signing_key: String, /// The public self-signing key of our identity. self_signing_key: String, + /// True if this identity was verified at some point but is not anymore. + has_verification_violation: bool, }, /// The user identity of other users. Other { @@ -27,6 +29,8 @@ pub enum UserIdentity { master_key: String, /// The public self-signing key of our identity. self_signing_key: String, + /// True if this identity was verified at some point but is not anymore. + has_verification_violation: bool, }, } @@ -44,6 +48,7 @@ impl UserIdentity { master_key: serde_json::to_string(&master)?, user_signing_key: serde_json::to_string(&user_signing)?, self_signing_key: serde_json::to_string(&self_signing)?, + has_verification_violation: i.has_verification_violation(), } } SdkUserIdentity::Other(i) => { @@ -54,6 +59,7 @@ impl UserIdentity { user_id: i.user_id().to_string(), master_key: serde_json::to_string(&master)?, self_signing_key: serde_json::to_string(&self_signing)?, + has_verification_violation: i.has_verification_violation(), } } })