Remove references to VerificationRequest
(#11050)
* Update references to `VerificationRequestEvent` * Update references to `Phase` * update references to legacy `PHASE_*` constants * Replace `request.canAccept` with `canAcceptVerificationRequest` * Replace `VerificationRequest` with the interface throughout * Minor strict type fixes * Add a couple of tests
This commit is contained in:
parent
6486255f54
commit
b9b93264b6
20 changed files with 72 additions and 57 deletions
|
@ -18,10 +18,10 @@ import React from "react";
|
|||
import { verificationMethods } from "matrix-js-sdk/src/crypto";
|
||||
import { SCAN_QR_CODE_METHOD } from "matrix-js-sdk/src/crypto/verification/QRCode";
|
||||
import {
|
||||
Phase,
|
||||
VerificationRequest,
|
||||
VerificationPhase as Phase,
|
||||
VerificationRequestEvent,
|
||||
} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
|
||||
} from "matrix-js-sdk/src/crypto-api";
|
||||
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
import { User } from "matrix-js-sdk/src/models/user";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
@ -202,7 +202,7 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
|
|||
};
|
||||
|
||||
private getDevice(): DeviceInfo | null {
|
||||
const deviceId = this.props.request && this.props.request.otherDeviceId;
|
||||
const deviceId = this.props.request?.otherDeviceId;
|
||||
const userId = MatrixClientPeg.get().getUserId();
|
||||
if (deviceId && userId) {
|
||||
return MatrixClientPeg.get().getStoredDevice(userId, deviceId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue