Fix key backup trust text for cross-signing

This fixes the key backup panel to use the correct object when checking whether
a device is verified or unverified via cross-signing trust.
This commit is contained in:
J. Ryan Stinnett 2020-03-16 18:59:07 +00:00
parent f5f433b347
commit cc27894fc9

View file

@ -277,25 +277,25 @@ export default class KeyBackupPanel extends React.PureComponent {
"Backup has an <validity>invalid</validity> signature from this session", "Backup has an <validity>invalid</validity> signature from this session",
{}, { validity }, {}, { validity },
); );
} else if (sig.valid && sig.device.isVerified()) { } else if (sig.valid && sig.deviceTrust.isVerified()) {
sigStatus = _t( sigStatus = _t(
"Backup has a <validity>valid</validity> signature from " + "Backup has a <validity>valid</validity> signature from " +
"<verify>verified</verify> session <device></device>", "<verify>verified</verify> session <device></device>",
{}, { validity, verify, device }, {}, { validity, verify, device },
); );
} else if (sig.valid && !sig.device.isVerified()) { } else if (sig.valid && !sig.deviceTrust.isVerified()) {
sigStatus = _t( sigStatus = _t(
"Backup has a <validity>valid</validity> signature from " + "Backup has a <validity>valid</validity> signature from " +
"<verify>unverified</verify> session <device></device>", "<verify>unverified</verify> session <device></device>",
{}, { validity, verify, device }, {}, { validity, verify, device },
); );
} else if (!sig.valid && sig.device.isVerified()) { } else if (!sig.valid && sig.deviceTrust.isVerified()) {
sigStatus = _t( sigStatus = _t(
"Backup has an <validity>invalid</validity> signature from " + "Backup has an <validity>invalid</validity> signature from " +
"<verify>verified</verify> session <device></device>", "<verify>verified</verify> session <device></device>",
{}, { validity, verify, device }, {}, { validity, verify, device },
); );
} else if (!sig.valid && !sig.device.isVerified()) { } else if (!sig.valid && !sig.deviceTrust.isVerified()) {
sigStatus = _t( sigStatus = _t(
"Backup has an <validity>invalid</validity> signature from " + "Backup has an <validity>invalid</validity> signature from " +
"<verify>unverified</verify> session <device></device>", "<verify>unverified</verify> session <device></device>",