1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Don't decrypt redacted messages (#2143)

This commit is contained in:
Šimon Brandner
2022-01-31 12:21:12 +01:00
committed by GitHub
parent 1643201363
commit 5e125e646c

View File

@@ -679,7 +679,12 @@ export class MatrixEvent extends EventEmitter {
}
public shouldAttemptDecryption() {
return this.isEncrypted() && !this.isBeingDecrypted() && !this.clearEvent;
if (this.isRedacted()) return false;
if (this.isBeingDecrypted()) return false;
if (this.clearEvent) return false;
if (!this.isEncrypted()) return false;
return true;
}
/**