mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-28 18:01:46 +02:00
dont enable e2ee when inviting a 3pid
This commit is contained in:
parent
98b418a809
commit
be13e86b09
@ -577,10 +577,13 @@ 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 client = MatrixClientPeg.get();
|
||||
const allHaveDeviceKeys = await canEncryptToAllUsers(client, targetIds);
|
||||
if (allHaveDeviceKeys) {
|
||||
createRoomOptions.encryption = true;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user