Merge branch 'uhoreg/symmetric-ssss-migrate' of git://github.com/uhoreg/matrix-react-sdk into uhoreg-uhoreg/symmetric-ssss-migrate
This commit is contained in:
commit
d72ce28a27
2 changed files with 12 additions and 0 deletions
|
@ -96,6 +96,9 @@ async function getSecretStorageKey({ keys: keyInfos }, ssssItemName) {
|
||||||
{
|
{
|
||||||
keyInfo: info,
|
keyInfo: info,
|
||||||
checkPrivateKey: async (input) => {
|
checkPrivateKey: async (input) => {
|
||||||
|
if (!info.pubkey) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
const key = await inputToKey(input);
|
const key = await inputToKey(input);
|
||||||
return MatrixClientPeg.get().checkSecretStoragePrivateKey(key, info.pubkey);
|
return MatrixClientPeg.get().checkSecretStoragePrivateKey(key, info.pubkey);
|
||||||
},
|
},
|
||||||
|
|
|
@ -147,6 +147,15 @@ export default class DeviceListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
} else if (await cli.secretStorageKeyNeedsUpgrade()) {
|
||||||
|
// FIXME: do we a different message?
|
||||||
|
ToastStore.sharedInstance().addOrReplaceToast({
|
||||||
|
key: THIS_DEVICE_TOAST_KEY,
|
||||||
|
title: _t("Encryption upgrade available"),
|
||||||
|
icon: "verification_warning",
|
||||||
|
props: {kind: 'upgrade_encryption'},
|
||||||
|
component: sdk.getComponent("toasts.SetupEncryptionToast"),
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY);
|
ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue