enable encryption when NOT inviting 3pids

pull/21833/head
Bruno Windels 2020-04-29 11:40:04 +02:00
parent f06a69d8cc
commit bb6d13781c
1 changed files with 1 additions and 1 deletions

View File

@ -578,7 +578,7 @@ export default class InviteDialog extends React.PureComponent {
// 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); const has3PidMembers = targets.some(t => t instanceof ThreepidMember);
if (has3PidMembers) { 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) {