From db91465c5634a801020d77aaf0a08fea5e338bfc Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 10 Dec 2019 22:00:08 -0700 Subject: [PATCH] Wrap the await call for unknown device lookups Otherwise we're awaiting the result of `map()`, which isn't accurate. --- src/cryptodevices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptodevices.js b/src/cryptodevices.js index 246fae3d73..161787fcbb 100644 --- a/src/cryptodevices.js +++ b/src/cryptodevices.js @@ -44,7 +44,7 @@ export function markAllDevicesKnown(matrixClient, devices) { * module:crypto~DeviceInfo|DeviceInfo}. */ export async function getUnknownDevicesForRoom(matrixClient, room) { - const roomMembers = await room.getEncryptionTargetMembers().map((m) => { + const roomMembers = (await room.getEncryptionTargetMembers()).map((m) => { return m.userId; }); const devices = await matrixClient.downloadKeys(roomMembers, false);