Wrap the await call for unknown device lookups

Otherwise we're awaiting the result of `map()`, which isn't accurate.
This commit is contained in:
Travis Ralston 2019-12-10 22:00:08 -07:00
parent c1b1f98201
commit db91465c56

View File

@ -44,7 +44,7 @@ export function markAllDevicesKnown(matrixClient, devices) {
* module:crypto~DeviceInfo|DeviceInfo}. * module:crypto~DeviceInfo|DeviceInfo}.
*/ */
export async function getUnknownDevicesForRoom(matrixClient, room) { export async function getUnknownDevicesForRoom(matrixClient, room) {
const roomMembers = await room.getEncryptionTargetMembers().map((m) => { const roomMembers = (await room.getEncryptionTargetMembers()).map((m) => {
return m.userId; return m.userId;
}); });
const devices = await matrixClient.downloadKeys(roomMembers, false); const devices = await matrixClient.downloadKeys(roomMembers, false);