Wrap the await call for unknown device lookups

Otherwise we're awaiting the result of `map()`, which isn't accurate.
pull/21833/head
Travis Ralston 2019-12-10 22:00:08 -07:00
parent c1b1f98201
commit db91465c56
1 changed files with 1 additions and 1 deletions

View File

@ -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);