diff --git a/src/domain/session/settings/FeaturesViewModel.ts b/src/domain/session/settings/FeaturesViewModel.ts index 6017cc6a..552e27d4 100644 --- a/src/domain/session/settings/FeaturesViewModel.ts +++ b/src/domain/session/settings/FeaturesViewModel.ts @@ -29,7 +29,12 @@ export class FeaturesViewModel extends ViewModel { name: this.i18n`Audio/video calls`, description: this.i18n`Allows starting and participating in A/V calls compatible with Element Call (MSC3401). Look for the start call option in the room menu ((...) in the right corner) to start a call.`, feature: FeatureFlag.Calls - })), + })), + new FeatureViewModel(this.childOptions({ + name: this.i18n`Cross-Signing`, + description: this.i18n`Allows.verifying the identity of people you chat with`, + feature: FeatureFlag.CrossSigning + })), ]; } } diff --git a/src/features.ts b/src/features.ts index e503f0e0..6fa5dd43 100644 --- a/src/features.ts +++ b/src/features.ts @@ -18,6 +18,7 @@ import type {SettingsStorage} from "./platform/web/dom/SettingsStorage"; export enum FeatureFlag { Calls = 1 << 0, + CrossSigning = 1 << 1 } export class FeatureSet { @@ -39,6 +40,10 @@ export class FeatureSet { return this.isFeatureEnabled(FeatureFlag.Calls); } + get crossSigning(): boolean { + return this.isFeatureEnabled(FeatureFlag.CrossSigning); + } + static async load(settingsStorage: SettingsStorage): Promise { const flags = await settingsStorage.getInt("enabled_features") || 0; return new FeatureSet(flags);