From 7d11c3092d851b90f045fb6c8d7e6e80a5a00067 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Oct 2020 16:38:02 +0100 Subject: [PATCH] Decorate failed e2ee downgrade attempts better Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/messages/EncryptionEvent.js | 13 +++++++++---- src/i18n/strings/en_EN.json | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/views/messages/EncryptionEvent.js b/src/components/views/messages/EncryptionEvent.js index ab0f3fde2e..a9ce10d202 100644 --- a/src/components/views/messages/EncryptionEvent.js +++ b/src/components/views/messages/EncryptionEvent.js @@ -25,10 +25,8 @@ export default class EncryptionEvent extends React.Component { let body; let classes = "mx_EventTile_bubble mx_cryptoEvent mx_cryptoEvent_icon"; - if ( - mxEvent.getContent().algorithm === 'm.megolm.v1.aes-sha2' && - MatrixClientPeg.get().isRoomEncrypted(mxEvent.getRoomId()) - ) { + const isRoomEncrypted = MatrixClientPeg.get().isRoomEncrypted(mxEvent.getRoomId()); + if (mxEvent.getContent().algorithm === 'm.megolm.v1.aes-sha2' && isRoomEncrypted) { body =