@@ -653,7 +653,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
653
653
* Implementation of {@link CryptoApi#getUserVerificationStatus}.
654
654
*/
655
655
public async getUserVerificationStatus ( userId : string ) : Promise < UserVerificationStatus > {
656
- const userIdentity : RustSdkCryptoJs . UserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
656
+ const userIdentity : RustSdkCryptoJs . OtherUserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
657
657
await this . getOlmMachineOrThrow ( ) . getIdentity ( new RustSdkCryptoJs . UserId ( userId ) ) ;
658
658
if ( userIdentity === undefined ) {
659
659
return new UserVerificationStatus ( false , false , false ) ;
@@ -662,7 +662,9 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
662
662
const verified = userIdentity . isVerified ( ) ;
663
663
const wasVerified = userIdentity . wasPreviouslyVerified ( ) ;
664
664
const needsUserApproval =
665
- userIdentity instanceof RustSdkCryptoJs . UserIdentity ? userIdentity . identityNeedsUserApproval ( ) : false ;
665
+ userIdentity instanceof RustSdkCryptoJs . OtherUserIdentity
666
+ ? userIdentity . identityNeedsUserApproval ( )
667
+ : false ;
666
668
userIdentity . free ( ) ;
667
669
return new UserVerificationStatus ( verified , wasVerified , false , needsUserApproval ) ;
668
670
}
@@ -671,7 +673,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
671
673
* Implementation of {@link CryptoApi#pinCurrentUserIdentity}.
672
674
*/
673
675
public async pinCurrentUserIdentity ( userId : string ) : Promise < void > {
674
- const userIdentity : RustSdkCryptoJs . UserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
676
+ const userIdentity : RustSdkCryptoJs . OtherUserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
675
677
await this . getOlmMachineOrThrow ( ) . getIdentity ( new RustSdkCryptoJs . UserId ( userId ) ) ;
676
678
677
679
if ( userIdentity === undefined ) {
@@ -1020,7 +1022,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
1020
1022
* Implementation of {@link CryptoApi#requestVerificationDM}
1021
1023
*/
1022
1024
public async requestVerificationDM ( userId : string , roomId : string ) : Promise < VerificationRequest > {
1023
- const userIdentity : RustSdkCryptoJs . UserIdentity | undefined = await this . olmMachine . getIdentity (
1025
+ const userIdentity : RustSdkCryptoJs . OtherUserIdentity | undefined = await this . olmMachine . getIdentity (
1024
1026
new RustSdkCryptoJs . UserId ( userId ) ,
1025
1027
) ;
1026
1028
@@ -2035,7 +2037,7 @@ class EventDecryptor {
2035
2037
errorDetails ,
2036
2038
) ;
2037
2039
2038
- case RustSdkCryptoJs . DecryptionErrorCode . SenderIdentityPreviouslyVerified :
2040
+ case RustSdkCryptoJs . DecryptionErrorCode . SenderIdentityVerificationViolation :
2039
2041
// We're refusing to decrypt due to not trusting the sender,
2040
2042
// rather than failing to decrypt due to lack of keys, so we
2041
2043
// don't need to keep it on the pending list.
@@ -2200,7 +2202,7 @@ function rustEncryptionInfoToJsEncryptionInfo(
2200
2202
case RustSdkCryptoJs . ShieldStateCode . SentInClear :
2201
2203
shieldReason = EventShieldReason . SENT_IN_CLEAR ;
2202
2204
break ;
2203
- case RustSdkCryptoJs . ShieldStateCode . PreviouslyVerified :
2205
+ case RustSdkCryptoJs . ShieldStateCode . VerificationViolation :
2204
2206
shieldReason = EventShieldReason . VERIFICATION_VIOLATION ;
2205
2207
break ;
2206
2208
}
0 commit comments