+
{getErrorMessage(mxEvent, verificationState)}
);
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 64680a93a3..5a0b9d7cac 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -3303,6 +3303,8 @@
"historical_event_no_key_backup": "Historical messages are not available on this device",
"historical_event_unverified_device": "You need to verify this device for access to historical messages",
"historical_event_user_not_joined": "You don't have access to this message",
+ "sender_identity_previously_verified": "Verified identity has changed",
+ "sender_unsigned_device": "Encrypted by a device not verified by its owner.",
"unable_to_decrypt": "Unable to decrypt message"
},
"disambiguated_profile": "%(displayName)s (%(matrixId)s)",
diff --git a/test/components/views/messages/DecryptionFailureBody-test.tsx b/test/components/views/messages/DecryptionFailureBody-test.tsx
index 8ba4503446..021e58d071 100644
--- a/test/components/views/messages/DecryptionFailureBody-test.tsx
+++ b/test/components/views/messages/DecryptionFailureBody-test.tsx
@@ -103,4 +103,32 @@ describe("DecryptionFailureBody", () => {
// Then
expect(container).toHaveTextContent("You don't have access to this message");
});
+
+ it("should handle messages from users who change identities after verification", async () => {
+ // When
+ const event = await mkDecryptionFailureMatrixEvent({
+ code: DecryptionFailureCode.SENDER_IDENTITY_PREVIOUSLY_VERIFIED,
+ msg: "User previously verified",
+ roomId: "fakeroom",
+ sender: "fakesender",
+ });
+ const { container } = customRender(event);
+
+ // Then
+ expect(container).toMatchSnapshot();
+ });
+
+ it("should handle messages from unverified devices", async () => {
+ // When
+ const event = await mkDecryptionFailureMatrixEvent({
+ code: DecryptionFailureCode.UNSIGNED_SENDER_DEVICE,
+ msg: "Unsigned device",
+ roomId: "fakeroom",
+ sender: "fakesender",
+ });
+ const { container } = customRender(event);
+
+ // Then
+ expect(container).toHaveTextContent("Encrypted by a device not verified by its owner");
+ });
});
diff --git a/test/components/views/messages/__snapshots__/DecryptionFailureBody-test.tsx.snap b/test/components/views/messages/__snapshots__/DecryptionFailureBody-test.tsx.snap
index 22e44fd16a..b2ba5b2a2e 100644
--- a/test/components/views/messages/__snapshots__/DecryptionFailureBody-test.tsx.snap
+++ b/test/components/views/messages/__snapshots__/DecryptionFailureBody-test.tsx.snap
@@ -19,3 +19,18 @@ exports[`DecryptionFailureBody Should display "Unable to decrypt message" 1`] =
`;
+
+exports[`DecryptionFailureBody should handle messages from users who change identities after verification 1`] = `
+