1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-10-31 01:45:39 +03:00

Improve typing (#7349)

This commit is contained in:
Michael Telatynski
2021-12-14 15:34:54 +00:00
committed by GitHub
parent b2548f05a8
commit 7033f8696a
8 changed files with 24 additions and 11 deletions

View File

@@ -94,9 +94,9 @@ export class DecryptionFailureTracker {
// localStorage.setItem('mx-decryption-failure-event-id-hashes', JSON.stringify(this.trackedEventHashMap));
// }
public eventDecrypted(e: MatrixEvent, err: MatrixError | Error): void {
public eventDecrypted(e: MatrixEvent, err: MatrixError): void {
if (err) {
this.addDecryptionFailure(new DecryptionFailure(e.getId(), err.code));
this.addDecryptionFailure(new DecryptionFailure(e.getId(), err.errcode));
} else {
// Could be an event in the failures, remove it
this.removeDecryptionFailuresForEvent(e);