Avoid soft crash if unknown device in verification
Rageshakes from the wild indicate that device was null here which implies that we somehow did not know about the device when verifiying it? Log and null-check to avoid a soft crash.
This commit is contained in:
parent
03fce86699
commit
5c0920da42
3 changed files with 30 additions and 14 deletions
|
@ -45,9 +45,6 @@ const EncryptionPanel = (props) => {
|
|||
}
|
||||
}, [verificationRequest]);
|
||||
|
||||
const deviceId = request && request.channel.deviceId;
|
||||
const device = MatrixClientPeg.get().getStoredDevice(MatrixClientPeg.get().getUserId(), deviceId);
|
||||
|
||||
useEffect(() => {
|
||||
async function awaitPromise() {
|
||||
setRequesting(true);
|
||||
|
@ -143,7 +140,7 @@ const EncryptionPanel = (props) => {
|
|||
key={request.channel.transactionId}
|
||||
inDialog={layout === "dialog"}
|
||||
phase={phase}
|
||||
device={device} />
|
||||
/>
|
||||
</React.Fragment>);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue