Merge pull request #5271 from matrix-org/t3chguy/fix/14851

Fix ensureDmExists for encryption detection
This commit is contained in:
Michael Telatynski 2020-10-01 17:59:27 +01:00 committed by GitHub
commit e52e33f5a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,9 +289,9 @@ export async function ensureDMExists(client: MatrixClient, userId: string): Prom
if (existingDMRoom) {
roomId = existingDMRoom.roomId;
} else {
let encryption;
let encryption: boolean = undefined;
if (privateShouldBeEncrypted()) {
encryption = canEncryptToAllUsers(client, [userId]);
encryption = await canEncryptToAllUsers(client, [userId]);
}
roomId = await createRoom({encryption, dmUserId: userId, spinner: false, andView: false});
await _waitForMember(client, roomId, userId);