Support EventShieldReason.MISMATCHED_SENDER (#30403)

The js-sdk now exposes a new event shield reason, which we should handle
correctly.
This commit is contained in:
Richard van der Hoff
2025-07-25 10:43:40 +01:00
committed by GitHub
parent b5160c47b3
commit fc04ad26ce
3 changed files with 9 additions and 0 deletions

View File

@@ -306,6 +306,10 @@ describe("EventTile", () => {
[EventShieldReason.MISMATCHED_SENDER_KEY, "Encrypted by an unverified session"],
[EventShieldReason.SENT_IN_CLEAR, "Not encrypted"],
[EventShieldReason.VERIFICATION_VIOLATION, "Sender's verified identity was reset"],
[
EventShieldReason.MISMATCHED_SENDER,
"The sender of the event does not match the owner of the device that sent it.",
],
])("shows the correct reason code for %i (%s)", async (reasonCode: EventShieldReason, expectedText: string) => {
mxEvent = await mkEncryptedMatrixEvent({
plainContent: { msgtype: "m.text", body: "msg1" },