Merge pull request #4509 from matrix-org/bwindels/dontencryptfor3pids
Don't enable e2ee when inviting a 3pidpull/21833/head
commit
d9469e6afe
|
@ -577,10 +577,13 @@ 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 client = MatrixClientPeg.get();
|
const has3PidMembers = targets.some(t => t instanceof ThreepidMember);
|
||||||
const allHaveDeviceKeys = await canEncryptToAllUsers(client, targetIds);
|
if (!has3PidMembers) {
|
||||||
if (allHaveDeviceKeys) {
|
const client = MatrixClientPeg.get();
|
||||||
createRoomOptions.encryption = true;
|
const allHaveDeviceKeys = await canEncryptToAllUsers(client, targetIds);
|
||||||
|
if (allHaveDeviceKeys) {
|
||||||
|
createRoomOptions.encryption = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue