Add MatrixEvent type

pull/21833/head
David Baker 2021-08-13 18:18:48 +01:00
parent c79b6a412d
commit 7c8637f5db
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import Spinner from '../elements/Spinner';
import InteractiveAuthDialog from '../dialogs/InteractiveAuthDialog'; import InteractiveAuthDialog from '../dialogs/InteractiveAuthDialog';
import ConfirmDestroyCrossSigningDialog from '../dialogs/security/ConfirmDestroyCrossSigningDialog'; import ConfirmDestroyCrossSigningDialog from '../dialogs/security/ConfirmDestroyCrossSigningDialog';
import { replaceableComponent } from "../../../utils/replaceableComponent"; import { replaceableComponent } from "../../../utils/replaceableComponent";
import { MatrixEvent } from '../../../../../matrix-js-sdk/src';
interface IState { interface IState {
error?: Error; error?: Error;
@ -63,7 +64,7 @@ export default class CrossSigningPanel extends React.PureComponent<{}, IState> {
cli.removeListener("crossSigning.keysChanged", this.onStatusChanged); cli.removeListener("crossSigning.keysChanged", this.onStatusChanged);
} }
private onAccountData = (event): void => { private onAccountData = (event: MatrixEvent): void => {
const type = event.getType(); const type = event.getType();
if (type.startsWith("m.cross_signing") || type.startsWith("m.secret_storage")) { if (type.startsWith("m.cross_signing") || type.startsWith("m.secret_storage")) {
this.getUpdatedStatus(); this.getUpdatedStatus();