Skip to content

Commit d4b9145

Browse files
authored
Merge pull request #4105 from matrix-org/valere/crypto_ffi_expose_verification_violation
crypto-ffi: Expose `has_verification_violation` for `UserIdentity`
2 parents 75683d2 + 49f7fe9 commit d4b9145

File tree

1 file changed

+6
-0
lines changed
  • bindings/matrix-sdk-crypto-ffi/src

1 file changed

+6
-0
lines changed

bindings/matrix-sdk-crypto-ffi/src/users.rs

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ pub enum UserIdentity {
1818
user_signing_key: String,
1919
/// The public self-signing key of our identity.
2020
self_signing_key: String,
21+
/// True if this identity was verified at some point but is not anymore.
22+
has_verification_violation: bool,
2123
},
2224
/// The user identity of other users.
2325
Other {
@@ -27,6 +29,8 @@ pub enum UserIdentity {
2729
master_key: String,
2830
/// The public self-signing key of our identity.
2931
self_signing_key: String,
32+
/// True if this identity was verified at some point but is not anymore.
33+
has_verification_violation: bool,
3034
},
3135
}
3236

@@ -44,6 +48,7 @@ impl UserIdentity {
4448
master_key: serde_json::to_string(&master)?,
4549
user_signing_key: serde_json::to_string(&user_signing)?,
4650
self_signing_key: serde_json::to_string(&self_signing)?,
51+
has_verification_violation: i.has_verification_violation(),
4752
}
4853
}
4954
SdkUserIdentity::Other(i) => {
@@ -54,6 +59,7 @@ impl UserIdentity {
5459
user_id: i.user_id().to_string(),
5560
master_key: serde_json::to_string(&master)?,
5661
self_signing_key: serde_json::to_string(&self_signing)?,
62+
has_verification_violation: i.has_verification_violation(),
5763
}
5864
}
5965
})

0 commit comments

Comments
 (0)