Skip to content

Commit

Permalink
Change device isolation mode to set errorOnVerifiedUserProblems to …
Browse files Browse the repository at this point in the history
…`false`

#92 changed the default mode
for encryption to throw an error when sending a message and the room contains either:
 - a verified user with an unverified device
 - a verifeid user who has changed their identity.

We're not really ready for this (we lack the UI to deal with it), so roll that
back.
  • Loading branch information
richvdh committed Sep 30, 2024
1 parent bd793a0 commit b0d484d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/settings/controllers/DeviceIsolationModeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ export default class DeviceIsolationModeController extends SettingController {
* @param settingValue - value of the "exclude_insecure_devices" setting.
*/
export function setDeviceIsolationMode(client: MatrixClient, settingValue: boolean): void {
client
.getCrypto()
?.setDeviceIsolationMode(
settingValue ? new OnlySignedDevicesIsolationMode() : new AllDevicesIsolationMode(true),
);
client.getCrypto()?.setDeviceIsolationMode(
settingValue
? new OnlySignedDevicesIsolationMode()
: // TODO: As part of https://github.com/element-hq/element-meta/issues/2492, we will change
// `errorOnVerifiedUserProblems` to `true`, but we need to have better UI in place before we can do so.
new AllDevicesIsolationMode(false),
);
}

0 comments on commit b0d484d

Please sign in to comment.