for self-verif, mention which device, not user we're verifying in panel
This commit is contained in:
parent
2ee780caa2
commit
030d594e67
3 changed files with 29 additions and 6 deletions
|
@ -22,6 +22,7 @@ import VerificationPanel from "./VerificationPanel";
|
|||
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||
import {ensureDMExists} from "../../../createRoom";
|
||||
import {useEventEmitter} from "../../../hooks/useEventEmitter";
|
||||
import {useAsyncMemo} from "../../../hooks/useAsyncMemo";
|
||||
import Modal from "../../../Modal";
|
||||
import {PHASE_REQUESTED, PHASE_UNSENT} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
|
||||
import * as sdk from "../../../index";
|
||||
|
@ -45,6 +46,12 @@ const EncryptionPanel = (props) => {
|
|||
}
|
||||
}, [verificationRequest]);
|
||||
|
||||
const deviceId = request && request.channel.deviceId;
|
||||
const device = useAsyncMemo(() => {
|
||||
const cli = MatrixClientPeg.get();
|
||||
return cli.getStoredDevice(cli.getUserId(), deviceId);
|
||||
}, [deviceId]);
|
||||
|
||||
useEffect(() => {
|
||||
async function awaitPromise() {
|
||||
setRequesting(true);
|
||||
|
@ -139,7 +146,8 @@ const EncryptionPanel = (props) => {
|
|||
request={request}
|
||||
key={request.channel.transactionId}
|
||||
inDialog={inDialog}
|
||||
phase={phase} />
|
||||
phase={phase}
|
||||
device={device} />
|
||||
</React.Fragment>);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue