message: move e2ee-default switch to well-known from config.json
diff: @@ -23,8 +23,8 @@ import dis from "./dispatcher/dispatcher";
  import * as Rooms from "./Rooms";
  import DMRoomMap from "./utils/DMRoomMap";
  import {getAddressType} from "./UserAddress";
  -import SettingsStore from "./settings/SettingsStore";
  -import SdkConfig from "./SdkConfig";
  +
  +const E2EE_WK_KEY = "im.vector.riot.e2ee";
  /**
  * Create a new room, and switch to it.
  @@ -238,5 +238,11 @@ export async function ensureDMExists(client, userId) {
  }
  export function privateShouldBeEncrypted() {
  - return SettingsStore.getValue("feature_cross_signing") && SdkConfig.get().e2ee_default_for_private_rooms !== false;
  + const clientWellKnown = MatrixClientPeg.get().getClientWellKnown();
  + if (clientWellKnown && clientWellKnown[E2EE_WK_KEY]) {
  + const defaultDisabled = clientWellKnown[E2EE_WK_KEY]["default"] === false;
  + return !defaultDisabled;
  + }
  +
  + return true;
  }
  