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:
@@ -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>);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user