Restore createRoom.canEncryptToAllUsers (#10491)
This commit is contained in:
parent
6ac366ee5a
commit
56423d4d53
2 changed files with 9 additions and 5 deletions
|
@ -399,11 +399,9 @@ export async function canEncryptToAllUsers(client: MatrixClient, userIds: string
|
|||
try {
|
||||
const usersDeviceMap = await client.downloadKeys(userIds);
|
||||
|
||||
// There are no devices at all.
|
||||
if (usersDeviceMap.size === 0) return false;
|
||||
|
||||
for (const devices of usersDeviceMap.values()) {
|
||||
if (devices.size === 0) {
|
||||
// This user does not have any encryption-capable devices.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue