mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Do not show alarming red shields on large encrypted rooms for your own device
Fixes: https://github.com/vector-im/riot-web/issues/12214
This commit is contained in:
parent
f0d306b07c
commit
41f4b38fe8
2 changed files with 6 additions and 2 deletions
|
@ -811,7 +811,9 @@ export default createReactClass({
|
|||
debuglog("e2e verified", verified, "unverified", unverified);
|
||||
|
||||
/* Check all verified user devices. */
|
||||
for (const userId of [...verified, cli.getUserId()]) {
|
||||
/* Don't alarm if no other users are verified */
|
||||
const targets = (verified.length > 0) ? [...verified, cli.getUserId()] : verified;
|
||||
for (const userId of targets) {
|
||||
const devices = await cli.getStoredDevicesForUser(userId);
|
||||
const anyDeviceNotVerified = devices.some(({deviceId}) => {
|
||||
return !cli.checkDeviceTrust(userId, deviceId).isVerified();
|
||||
|
|
|
@ -166,7 +166,9 @@ export default createReactClass({
|
|||
});
|
||||
|
||||
/* Check all verified user devices. */
|
||||
for (const userId of [...verified, cli.getUserId()]) {
|
||||
/* Don't alarm if no other users are verified */
|
||||
const targets = (verified.length > 0) ? [...verified, cli.getUserId()] : verified;
|
||||
for (const userId of targets) {
|
||||
const devices = await cli.getStoredDevicesForUser(userId);
|
||||
const allDevicesVerified = devices.every(({deviceId}) => {
|
||||
return cli.checkDeviceTrust(userId, deviceId).isVerified();
|
||||
|
|
Loading…
Reference in a new issue