mirror of https://github.com/vector-im/riot-web
Check for .well-known E2EE settings under new key
This adds an extra check for `.well-known` E2EE settings under the key `im.vector.e2ee`. The older key `im.vector.riot.e2ee` is kept for historical compatibility. Part of https://github.com/vector-im/element-web/issues/14954pull/21833/head
parent
d700a5a78c
commit
b293ef0674
|
@ -27,7 +27,8 @@ import * as Rooms from "./Rooms";
|
|||
import DMRoomMap from "./utils/DMRoomMap";
|
||||
import {getAddressType} from "./UserAddress";
|
||||
|
||||
const E2EE_WK_KEY = "im.vector.riot.e2ee";
|
||||
const E2EE_WK_KEY = "im.vector.e2ee";
|
||||
const E2EE_WK_KEY_DEPRECATED = "im.vector.riot.e2ee";
|
||||
|
||||
// we define a number of interfaces which take their names from the js-sdk
|
||||
/* eslint-disable camelcase */
|
||||
|
@ -300,6 +301,10 @@ export function privateShouldBeEncrypted() {
|
|||
const defaultDisabled = clientWellKnown[E2EE_WK_KEY]["default"] === false;
|
||||
return !defaultDisabled;
|
||||
}
|
||||
if (clientWellKnown && clientWellKnown[E2EE_WK_KEY_DEPRECATED]) {
|
||||
const defaultDisabled = clientWellKnown[E2EE_WK_KEY_DEPRECATED]["default"] === false;
|
||||
return !defaultDisabled;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue