dont attempt to decrypt redacted events

this will show them as undecryptable for now though
This commit is contained in:
Bruno Windels 2020-09-08 17:16:01 +02:00
parent 773cb3420f
commit 36a8ec0110

View File

@ -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);
}