You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
targets can also contain RoomMember, so take the positive case rather
This commit is contained in:
@ -577,8 +577,8 @@ 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 containsNonMatrixUsers = targets.some(t => !(t instanceof DirectoryMember));
|
const has3PidMembers = targets.some(t => t instanceof ThreepidMember);
|
||||||
if (!containsNonMatrixUsers) {
|
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) {
|
||||||
|
Reference in New Issue
Block a user