mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Merge pull request #5271 from matrix-org/t3chguy/fix/14851
Fix ensureDmExists for encryption detection
This commit is contained in:
commit
e52e33f5a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user