Remove usage of deprecated CryptoEvents (#126)

* Remove usage of `CryptoEvent.DeviceVerificationChanged`

* Remove usage of `CryptoEvent.KeySignatureUploadFailure`

* Remove usage of `CryptoEvent.Warning`

* Merge `CryptoEvent.DevicesUpdated` and `CryptoEvent.WillUpdateDevices` behaviour
This commit is contained in:
Florian Duros 2024-10-08 10:13:44 +02:00 committed by GitHub
parent a0cb9470cc
commit 31bd10e887
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1 additions and 196 deletions

View file

@ -428,7 +428,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
context.client.on(RoomStateEvent.Update, this.onRoomStateUpdate);
context.client.on(RoomEvent.MyMembership, this.onMyMembership);
context.client.on(CryptoEvent.KeyBackupStatus, this.onKeyBackupStatus);
context.client.on(CryptoEvent.DeviceVerificationChanged, this.onDeviceVerificationChanged);
context.client.on(CryptoEvent.UserTrustStatusChanged, this.onUserVerificationChanged);
context.client.on(CryptoEvent.KeysChanged, this.onCrossSigningKeysChanged);
context.client.on(MatrixEventEvent.Decrypted, this.onEventDecrypted);
@ -974,7 +973,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
this.context.client.removeListener(RoomEvent.MyMembership, this.onMyMembership);
this.context.client.removeListener(RoomStateEvent.Update, this.onRoomStateUpdate);
this.context.client.removeListener(CryptoEvent.KeyBackupStatus, this.onKeyBackupStatus);
this.context.client.removeListener(CryptoEvent.DeviceVerificationChanged, this.onDeviceVerificationChanged);
this.context.client.removeListener(CryptoEvent.UserTrustStatusChanged, this.onUserVerificationChanged);
this.context.client.removeListener(CryptoEvent.KeysChanged, this.onCrossSigningKeysChanged);
this.context.client.removeListener(MatrixEventEvent.Decrypted, this.onEventDecrypted);
@ -1438,14 +1436,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
);
};
private onDeviceVerificationChanged = (userId: string): void => {
const room = this.state.room;
if (!room?.currentState.getMember(userId)) {
return;
}
this.updateE2EStatus(room);
};
private onUserVerificationChanged = (userId: string): void => {
const room = this.state.room;
if (!room || !room.currentState.getMember(userId)) {