1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Fix all megolm error reported as unknown (#8916)

* Fix all megolm error reported as unknown

* code review

* bad paste in comment
This commit is contained in:
Valere
2022-06-30 09:55:05 +02:00
committed by GitHub
parent 4eab0deeb3
commit f137bf3fd3
3 changed files with 13 additions and 5 deletions

View File

@@ -32,6 +32,7 @@ import { logger } from "matrix-js-sdk/src/logger";
import { throttle } from "lodash";
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
import { RoomType } from "matrix-js-sdk/src/@types/event";
import { DecryptionError } from 'matrix-js-sdk/src/crypto/algorithms';
// focus-visible is a Polyfill for the :focus-visible CSS pseudo-attribute used by various components
import 'focus-visible';
@@ -1452,7 +1453,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
// When logging out, stop tracking failures and destroy state
cli.on(HttpApiEvent.SessionLoggedOut, () => dft.stop());
cli.on(MatrixEventEvent.Decrypted, (e, err) => dft.eventDecrypted(e, err as MatrixError));
cli.on(MatrixEventEvent.Decrypted, (e, err) => dft.eventDecrypted(e, err as DecryptionError));
cli.on(ClientEvent.Room, (room) => {
if (MatrixClientPeg.get().isCryptoEnabled()) {