From 36a8ec0110008a3b5fe112496aa21a12c409d894 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 8 Sep 2020 17:16:01 +0200 Subject: [PATCH] dont attempt to decrypt redacted events this will show them as undecryptable for now though --- src/matrix/e2ee/RoomEncryption.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/matrix/e2ee/RoomEncryption.js b/src/matrix/e2ee/RoomEncryption.js index 3538381f..c8f993e5 100644 --- a/src/matrix/e2ee/RoomEncryption.js +++ b/src/matrix/e2ee/RoomEncryption.js @@ -56,6 +56,9 @@ export class RoomEncryption { } async decrypt(event, isSync, isTimelineOpen, retryData, txn) { + if (event.redacted_because || event.unsigned?.redacted_because) { + return; + } if (event.content?.algorithm !== MEGOLM_ALGORITHM) { throw new Error("Unsupported algorithm: " + event.content?.algorithm); }