Merge pull request #4513 from matrix-org/bwindels/dontencryptfor3pids-rc
Don't enable e2ee when inviting a 3pid
This commit is contained in:
commit
da52a16ff4
1 changed files with 7 additions and 4 deletions
|
@ -577,12 +577,15 @@ export default class InviteDialog extends React.PureComponent {
|
||||||
if (SettingsStore.getValue("feature_cross_signing")) {
|
if (SettingsStore.getValue("feature_cross_signing")) {
|
||||||
// Check whether all users have uploaded device keys before.
|
// Check whether all users have uploaded device keys before.
|
||||||
// If so, enable encryption in the new room.
|
// If so, enable encryption in the new room.
|
||||||
|
const has3PidMembers = targets.some(t => t instanceof ThreepidMember);
|
||||||
|
if (!has3PidMembers) {
|
||||||
const client = MatrixClientPeg.get();
|
const client = MatrixClientPeg.get();
|
||||||
const allHaveDeviceKeys = await canEncryptToAllUsers(client, targetIds);
|
const allHaveDeviceKeys = await canEncryptToAllUsers(client, targetIds);
|
||||||
if (allHaveDeviceKeys) {
|
if (allHaveDeviceKeys) {
|
||||||
createRoomOptions.encryption = true;
|
createRoomOptions.encryption = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if it's a traditional DM and create the room if required.
|
// Check if it's a traditional DM and create the room if required.
|
||||||
// TODO: [Canonical DMs] Remove this check and instead just create the multi-person DM
|
// TODO: [Canonical DMs] Remove this check and instead just create the multi-person DM
|
||||||
|
|
Loading…
Reference in a new issue