dont enable e2ee when inviting a 3pid

This commit is contained in:
Bruno Windels 2020-04-28 17:41:10 +02:00
parent 98b418a809
commit be13e86b09

View file

@ -577,12 +577,15 @@ export default class InviteDialog extends React.PureComponent {
if (SettingsStore.getValue("feature_cross_signing")) {
// Check whether all users have uploaded device keys before.
// If so, enable encryption in the new room.
const containsNonMatrixUsers = targets.some(t => !(t instanceof DirectoryMember));
if (!containsNonMatrixUsers) {
const client = MatrixClientPeg.get();
const allHaveDeviceKeys = await canEncryptToAllUsers(client, targetIds);
if (allHaveDeviceKeys) {
createRoomOptions.encryption = true;
}
}
}
// 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