You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Replaced string actions with their corresponding types
This commit is contained in:
@@ -19,10 +19,11 @@ import dis from "./dispatcher/dispatcher";
|
||||
import Modal from './Modal';
|
||||
import * as sdk from './index';
|
||||
import { _t } from './languageHandler';
|
||||
import {RIGHT_PANEL_PHASES} from "./stores/RightPanelStorePhases";
|
||||
import {RightPanelPhases} from "./stores/RightPanelStorePhases";
|
||||
import {findDMForUser} from './createRoom';
|
||||
import {accessSecretStorage} from './CrossSigningManager';
|
||||
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
|
||||
import {Action} from './dispatcher/actions';
|
||||
|
||||
async function enable4SIfNeeded() {
|
||||
const cli = MatrixClientPeg.get();
|
||||
@@ -91,8 +92,8 @@ export async function verifyDevice(user, device) {
|
||||
verificationMethods.SAS,
|
||||
);
|
||||
dis.dispatch({
|
||||
action: "set_right_panel_phase",
|
||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||
action: Action.SetRightPanelPhase,
|
||||
phase: RightPanelPhases.EncryptionPanel,
|
||||
refireParams: {member: user, verificationRequestPromise},
|
||||
});
|
||||
} else if (action === "legacy") {
|
||||
@@ -120,8 +121,8 @@ export async function legacyVerifyUser(user) {
|
||||
}
|
||||
const verificationRequestPromise = cli.requestVerification(user.userId);
|
||||
dis.dispatch({
|
||||
action: "set_right_panel_phase",
|
||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||
action: Action.SetRightPanelPhase,
|
||||
phase: RightPanelPhases.EncryptionPanel,
|
||||
refireParams: {member: user, verificationRequestPromise},
|
||||
});
|
||||
}
|
||||
@@ -132,8 +133,8 @@ export async function verifyUser(user) {
|
||||
}
|
||||
const existingRequest = pendingVerificationRequestForUser(user);
|
||||
dis.dispatch({
|
||||
action: "set_right_panel_phase",
|
||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||
action: Action.SetRightPanelPhase,
|
||||
phase: RightPanelPhases.EncryptionPanel,
|
||||
refireParams: {
|
||||
member: user,
|
||||
verificationRequest: existingRequest,
|
||||
|
||||
Reference in New Issue
Block a user