Show EncryptionPanel straight away when there is an ongoing verification request for a user
This commit is contained in:
parent
053a5a5ff4
commit
abf12a3ddf
2 changed files with 27 additions and 10 deletions
|
@ -111,12 +111,7 @@ export async function verifyUser(user) {
|
|||
if (!await enable4SIfNeeded()) {
|
||||
return;
|
||||
}
|
||||
const cli = MatrixClientPeg.get();
|
||||
const dmRoom = findDMForUser(cli, user.userId);
|
||||
let existingRequest;
|
||||
if (dmRoom) {
|
||||
existingRequest = cli.findVerificationRequestDMInProgress(dmRoom.roomId);
|
||||
}
|
||||
const existingRequest = pendingVerificationRequestForUser(user);
|
||||
dis.dispatch({
|
||||
action: "set_right_panel_phase",
|
||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||
|
@ -126,3 +121,11 @@ export async function verifyUser(user) {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function pendingVerificationRequestForUser(user) {
|
||||
const cli = MatrixClientPeg.get();
|
||||
const dmRoom = findDMForUser(cli, user.userId);
|
||||
if (dmRoom) {
|
||||
return cli.findVerificationRequestDMInProgress(dmRoom.roomId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue