From 93f2a8377432dd5310417534ee240f0271d6dc18 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Fri, 8 May 2020 16:36:13 +0100 Subject: [PATCH] Revert "Assume room should be unencrypted if homeserver does not implement keys/query" This reverts commit baa7a86e3ea5d9e79481b9d037a29f7df4af1928. --- src/createRoom.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/createRoom.js b/src/createRoom.js index 4d59b11656..a39d2c2216 100644 --- a/src/createRoom.js +++ b/src/createRoom.js @@ -212,17 +212,7 @@ export async function _waitForMember(client, roomId, userId, opts = { timeout: 1 * can encrypt to. */ export async function canEncryptToAllUsers(client, userIds) { - let usersDeviceMap; - try { - usersDeviceMap = await client.downloadKeys(userIds); - } catch (ex) { - if (ex.httpStatus === 404) { - // The endpoint to fetch keys doesn't exist: force unencrypted. - // See: https://github.com/vector-im/riot-web/issues/13598 - return false; - } - throw ex; - } + const usersDeviceMap = await client.downloadKeys(userIds); // { "@user:host": { "DEVICE": {...}, ... }, ... } return Object.values(usersDeviceMap).every((userDevices) => // { "DEVICE": {...}, ... }