Skip to content

Commit

Permalink
Don't decrypt redacted messages (#2143)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBrandner committed Jan 31, 2022
1 parent 1643201 commit 5e125e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/models/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 5e125e6

Please sign in to comment.