Merge pull request #3626 from matrix-org/jryans/cross-signing-flag
Add cross-signing feature flag
This commit is contained in:
commit
31b2d263f2
4 changed files with 21 additions and 3 deletions
|
@ -220,6 +220,16 @@ class MatrixClientPeg {
|
|||
identityServer: new IdentityAuthClient(),
|
||||
};
|
||||
|
||||
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
||||
// TODO: Cross-signing keys are temporarily in memory only. A
|
||||
// separate task in the cross-signing project will build from here.
|
||||
const keys = [];
|
||||
opts.cryptoCallbacks = {
|
||||
getCrossSigningKey: k => keys[k],
|
||||
saveCrossSigningKeys: newKeys => Object.assign(keys, newKeys),
|
||||
};
|
||||
}
|
||||
|
||||
this.matrixClient = createMatrixClient(opts);
|
||||
|
||||
// we're going to add eventlisteners for each matrix event tile, so the
|
||||
|
|
|
@ -343,6 +343,7 @@
|
|||
"Use the new, consistent UserInfo panel for Room Members and Group Members": "Use the new, consistent UserInfo panel for Room Members and Group Members",
|
||||
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
|
||||
"Send verification requests in direct message": "Send verification requests in direct message",
|
||||
"Enable cross-signing to verify per-user instead of per-device": "Enable cross-signing to verify per-user instead of per-device",
|
||||
"Use the new, faster, composer for writing messages": "Use the new, faster, composer for writing messages",
|
||||
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
||||
"Use compact timeline layout": "Use compact timeline layout",
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
} from "./controllers/NotificationControllers";
|
||||
import CustomStatusController from "./controllers/CustomStatusController";
|
||||
import ThemeController from './controllers/ThemeController';
|
||||
import LowBandwidthController from "./controllers/LowBandwidthController";
|
||||
import ReloadOnChangeController from "./controllers/ReloadOnChangeController";
|
||||
|
||||
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
|
||||
const LEVELS_ROOM_SETTINGS = ['device', 'room-device', 'room-account', 'account', 'config'];
|
||||
|
@ -146,6 +146,13 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_cross_signing": {
|
||||
isFeature: true,
|
||||
displayName: _td("Enable cross-signing to verify per-user instead of per-device"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
controller: new ReloadOnChangeController(),
|
||||
},
|
||||
"useCiderComposer": {
|
||||
displayName: _td("Use the new, faster, composer for writing messages"),
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
|
@ -427,7 +434,7 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
||||
displayName: _td('Low bandwidth mode'),
|
||||
default: false,
|
||||
controller: new LowBandwidthController(),
|
||||
controller: new ReloadOnChangeController(),
|
||||
},
|
||||
"fallbackICEServerAllowed": {
|
||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import SettingController from "./SettingController";
|
||||
import PlatformPeg from "../../PlatformPeg";
|
||||
|
||||
export default class LowBandwidthController extends SettingController {
|
||||
export default class ReloadOnChangeController extends SettingController {
|
||||
onChange(level, roomId, newValue) {
|
||||
PlatformPeg.get().reload();
|
||||
}
|
Loading…
Reference in a new issue