Show red shield for users that become unverified

For any users that we previously verified but that are not unverified, we will
now mark them and rooms they are in with a red shield.

Fixes https://github.com/vector-im/riot-web/issues/12808
This commit is contained in:
J. Ryan Stinnett 2020-03-28 00:21:17 +00:00
parent 4f3d4426ea
commit 37619dd127
3 changed files with 15 additions and 5 deletions

View file

@ -68,8 +68,10 @@ export const getE2EStatus = (cli, userId, devices) => {
return hasUnverifiedDevice ? "warning" : "verified";
}
const isMe = userId === cli.getUserId();
const userVerified = cli.checkUserTrust(userId).isCrossSigningVerified();
if (!userVerified) return "normal";
const userTrust = cli.checkUserTrust(userId);
if (!userTrust.isCrossSigningVerified()) {
return userTrust.wasCrossSigningVerified() ? "warning" : "normal";
}
const anyDeviceUnverified = devices.some(device => {
const { deviceId } = device;