@@ -10,7 +10,7 @@ import classNames from "classnames";
1010import React , { forwardRef , ForwardRefExoticComponent , useContext } from "react" ;
1111import { MatrixEvent } from "matrix-js-sdk/src/matrix" ;
1212import { DecryptionFailureCode } from "matrix-js-sdk/src/crypto-api" ;
13- import { WarningIcon } from "@vector-im/compound-design-tokens/assets/web/icons" ;
13+ import { BlockIcon } from "@vector-im/compound-design-tokens/assets/web/icons" ;
1414
1515import { _t } from "../../../languageHandler" ;
1616import { IBodyProps } from "./IBodyProps" ;
@@ -41,15 +41,20 @@ function getErrorMessage(mxEvent: MatrixEvent, isVerified: boolean | undefined):
4141 case DecryptionFailureCode . SENDER_IDENTITY_PREVIOUSLY_VERIFIED :
4242 return (
4343 < span >
44- < WarningIcon className = "mx_Icon mx_Icon_16" />
44+ < BlockIcon className = "mx_Icon mx_Icon_16" />
4545 { _t ( "timeline|decryption_failure|sender_identity_previously_verified" ) }
4646 </ span >
4747 ) ;
4848
4949 case DecryptionFailureCode . UNSIGNED_SENDER_DEVICE :
5050 // TODO: event should be hidden instead of showing this error.
5151 // To be revisited as part of https://github.com/element-hq/element-meta/issues/2449
52- return _t ( "timeline|decryption_failure|sender_unsigned_device" ) ;
52+ return (
53+ < span >
54+ < BlockIcon className = "mx_Icon mx_Icon_16" />
55+ { _t ( "timeline|decryption_failure|sender_unsigned_device" ) }
56+ </ span >
57+ ) ;
5358 }
5459 return _t ( "timeline|decryption_failure|unable_to_decrypt" ) ;
5560}
@@ -58,7 +63,8 @@ function getErrorMessage(mxEvent: MatrixEvent, isVerified: boolean | undefined):
5863function errorClassName ( mxEvent : MatrixEvent ) : string | null {
5964 switch ( mxEvent . decryptionFailureReason ) {
6065 case DecryptionFailureCode . SENDER_IDENTITY_PREVIOUSLY_VERIFIED :
61- return "mx_DecryptionFailureVerifiedIdentityChanged" ;
66+ case DecryptionFailureCode . UNSIGNED_SENDER_DEVICE :
67+ return "mx_DecryptionFailureSenderTrustRequirement" ;
6268
6369 default :
6470 return null ;
0 commit comments