@@ -653,7 +653,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
653653 * Implementation of {@link CryptoApi#getUserVerificationStatus}.
654654 */
655655 public async getUserVerificationStatus ( userId : string ) : Promise < UserVerificationStatus > {
656- const userIdentity : RustSdkCryptoJs . UserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
656+ const userIdentity : RustSdkCryptoJs . OtherUserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
657657 await this . getOlmMachineOrThrow ( ) . getIdentity ( new RustSdkCryptoJs . UserId ( userId ) ) ;
658658 if ( userIdentity === undefined ) {
659659 return new UserVerificationStatus ( false , false , false ) ;
@@ -662,7 +662,9 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
662662 const verified = userIdentity . isVerified ( ) ;
663663 const wasVerified = userIdentity . wasPreviouslyVerified ( ) ;
664664 const needsUserApproval =
665- userIdentity instanceof RustSdkCryptoJs . UserIdentity ? userIdentity . identityNeedsUserApproval ( ) : false ;
665+ userIdentity instanceof RustSdkCryptoJs . OtherUserIdentity
666+ ? userIdentity . identityNeedsUserApproval ( )
667+ : false ;
666668 userIdentity . free ( ) ;
667669 return new UserVerificationStatus ( verified , wasVerified , false , needsUserApproval ) ;
668670 }
@@ -671,7 +673,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
671673 * Implementation of {@link CryptoApi#pinCurrentUserIdentity}.
672674 */
673675 public async pinCurrentUserIdentity ( userId : string ) : Promise < void > {
674- const userIdentity : RustSdkCryptoJs . UserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
676+ const userIdentity : RustSdkCryptoJs . OtherUserIdentity | RustSdkCryptoJs . OwnUserIdentity | undefined =
675677 await this . getOlmMachineOrThrow ( ) . getIdentity ( new RustSdkCryptoJs . UserId ( userId ) ) ;
676678
677679 if ( userIdentity === undefined ) {
@@ -1020,7 +1022,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
10201022 * Implementation of {@link CryptoApi#requestVerificationDM}
10211023 */
10221024 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 (
10241026 new RustSdkCryptoJs . UserId ( userId ) ,
10251027 ) ;
10261028
@@ -2035,7 +2037,7 @@ class EventDecryptor {
20352037 errorDetails ,
20362038 ) ;
20372039
2038- case RustSdkCryptoJs . DecryptionErrorCode . SenderIdentityPreviouslyVerified :
2040+ case RustSdkCryptoJs . DecryptionErrorCode . SenderIdentityVerificationViolation :
20392041 // We're refusing to decrypt due to not trusting the sender,
20402042 // rather than failing to decrypt due to lack of keys, so we
20412043 // don't need to keep it on the pending list.
@@ -2200,7 +2202,7 @@ function rustEncryptionInfoToJsEncryptionInfo(
22002202 case RustSdkCryptoJs . ShieldStateCode . SentInClear :
22012203 shieldReason = EventShieldReason . SENT_IN_CLEAR ;
22022204 break ;
2203- case RustSdkCryptoJs . ShieldStateCode . PreviouslyVerified :
2205+ case RustSdkCryptoJs . ShieldStateCode . VerificationViolation :
22042206 shieldReason = EventShieldReason . VERIFICATION_VIOLATION ;
22052207 break ;
22062208 }
0 commit comments