mirror of https://github.com/vector-im/riot-web
Fix ensureDmExists for encryption detection
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
0f2c08f532
commit
245ead48b8
|
@ -289,9 +289,9 @@ export async function ensureDMExists(client: MatrixClient, userId: string): Prom
|
||||||
if (existingDMRoom) {
|
if (existingDMRoom) {
|
||||||
roomId = existingDMRoom.roomId;
|
roomId = existingDMRoom.roomId;
|
||||||
} else {
|
} else {
|
||||||
let encryption;
|
let encryption: boolean = undefined;
|
||||||
if (privateShouldBeEncrypted()) {
|
if (privateShouldBeEncrypted()) {
|
||||||
encryption = canEncryptToAllUsers(client, [userId]);
|
encryption = await canEncryptToAllUsers(client, [userId]);
|
||||||
}
|
}
|
||||||
roomId = await createRoom({encryption, dmUserId: userId, spinner: false, andView: false});
|
roomId = await createRoom({encryption, dmUserId: userId, spinner: false, andView: false});
|
||||||
await _waitForMember(client, roomId, userId);
|
await _waitForMember(client, roomId, userId);
|
||||||
|
|
Loading…
Reference in New Issue