Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 1d3ca7a

Browse files
committed
Remove feature_dehydration
1 parent b79343d commit 1d3ca7a

File tree

4 files changed

+1
-30
lines changed

4 files changed

+1
-30
lines changed

Diff for: src/Lifecycle.ts

-12
Original file line numberDiff line numberDiff line change
@@ -799,18 +799,6 @@ async function doSetLoggedIn(
799799
PosthogAnalytics.instance.startListeningToSettingsChanges(client);
800800
}
801801

802-
if (credentials.freshLogin && SettingsStore.getValue("feature_dehydration")) {
803-
// If we just logged in, try to rehydrate a device instead of using a
804-
// new device. If it succeeds, we'll get a new device ID, so make sure
805-
// we persist that ID to localStorage
806-
const newDeviceId = await client.rehydrateDevice();
807-
if (newDeviceId) {
808-
credentials.deviceId = newDeviceId;
809-
}
810-
811-
delete credentials.freshLogin;
812-
}
813-
814802
if (localStorage) {
815803
try {
816804
await persistCredentials(credentials);

Diff for: src/SecurityManager.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { MatrixClientPeg } from "./MatrixClientPeg";
1616
import { _t } from "./languageHandler";
1717
import { isSecureBackupRequired } from "./utils/WellKnownUtils";
1818
import AccessSecretStorageDialog, { KeyParams } from "./components/views/dialogs/security/AccessSecretStorageDialog";
19-
import SettingsStore from "./settings/SettingsStore";
2019
import { ModuleRunner } from "./modules/ModuleRunner";
2120
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
2221
import InteractiveAuthDialog from "./components/views/dialogs/InteractiveAuthDialog";
@@ -278,14 +277,7 @@ async function doAccessSecretStorage(func: () => Promise<void>, forceReset: bool
278277
await crypto.bootstrapSecretStorage({});
279278

280279
const keyId = Object.keys(secretStorageKeys)[0];
281-
if (keyId && SettingsStore.getValue("feature_dehydration")) {
282-
let dehydrationKeyInfo = {};
283-
if (secretStorageKeyInfo[keyId] && secretStorageKeyInfo[keyId].passphrase) {
284-
dehydrationKeyInfo = { passphrase: secretStorageKeyInfo[keyId].passphrase };
285-
}
286-
logger.log("accessSecretStorage: Setting dehydration key");
287-
await cli.setDehydrationKey(secretStorageKeys[keyId], dehydrationKeyInfo, "Backup device");
288-
} else if (!keyId) {
280+
if (!keyId) {
289281
logger.warn("accessSecretStorage: Not setting dehydration key: no SSSS key found");
290282
} else {
291283
logger.log("accessSecretStorage: Not setting dehydration key: feature disabled");

Diff for: src/i18n/strings/en_EN.json

-1
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,6 @@
14101410
"click_for_info": "Click for more info",
14111411
"currently_experimental": "Currently experimental.",
14121412
"custom_themes": "Support adding custom themes",
1413-
"dehydration": "Offline encrypted messaging using dehydrated devices",
14141413
"dynamic_room_predecessors": "Dynamic room predecessors",
14151414
"dynamic_room_predecessors_description": "Enable MSC3946 (to support late-arriving room archives)",
14161415
"element_call_video_rooms": "Element Call video rooms",

Diff for: src/settings/Settings.tsx

-8
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,6 @@ export const SETTINGS: { [setting: string]: ISetting } = {
303303
supportedLevelsAreOrdered: true,
304304
default: false,
305305
},
306-
"feature_dehydration": {
307-
isFeature: true,
308-
labsGroup: LabGroup.Encryption,
309-
displayName: _td("labs|dehydration"),
310-
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG_PRIORITISED,
311-
supportedLevelsAreOrdered: true,
312-
default: false,
313-
},
314306
"feature_exclude_insecure_devices": {
315307
isFeature: true,
316308
labsGroup: LabGroup.Encryption,

0 commit comments

Comments
 (0)