mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Merge pull request #5271 from matrix-org/t3chguy/fix/14851
Fix ensureDmExists for encryption detection
This commit is contained in:
commit
e52e33f5a1
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue