+
{getErrorMessage(mxEvent, verificationState)}
);
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 8b09ca922b..0611b539be 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -3293,6 +3293,7 @@
"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",
"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..26183067a9 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).toHaveTextContent("Verified identity has changed");
+ });
+
+ 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");
+ });
});