1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Fix ensureDmExists for encryption detection

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2020-10-01 15:11:01 +01:00
parent 0f2c08f532
commit 245ead48b8

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