You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Require registration for verification actions
Fixes https://github.com/vector-im/element-web/issues/16277
This commit is contained in:
@@ -74,6 +74,10 @@ function UntrustedDeviceDialog(props) {
|
|||||||
|
|
||||||
export async function verifyDevice(user, device) {
|
export async function verifyDevice(user, device) {
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
|
if (cli.isGuest()) {
|
||||||
|
dis.dispatch({action: 'require_registration'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
// if cross-signing is not explicitly disabled, check if it should be enabled first.
|
// if cross-signing is not explicitly disabled, check if it should be enabled first.
|
||||||
if (cli.getCryptoTrustCrossSignedDevices()) {
|
if (cli.getCryptoTrustCrossSignedDevices()) {
|
||||||
if (!await enable4SIfNeeded()) {
|
if (!await enable4SIfNeeded()) {
|
||||||
@@ -113,6 +117,10 @@ export async function verifyDevice(user, device) {
|
|||||||
|
|
||||||
export async function legacyVerifyUser(user) {
|
export async function legacyVerifyUser(user) {
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
|
if (cli.isGuest()) {
|
||||||
|
dis.dispatch({action: 'require_registration'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
// if cross-signing is not explicitly disabled, check if it should be enabled first.
|
// if cross-signing is not explicitly disabled, check if it should be enabled first.
|
||||||
if (cli.getCryptoTrustCrossSignedDevices()) {
|
if (cli.getCryptoTrustCrossSignedDevices()) {
|
||||||
if (!await enable4SIfNeeded()) {
|
if (!await enable4SIfNeeded()) {
|
||||||
@@ -128,6 +136,11 @@ export async function legacyVerifyUser(user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function verifyUser(user) {
|
export async function verifyUser(user) {
|
||||||
|
const cli = MatrixClientPeg.get();
|
||||||
|
if (cli.isGuest()) {
|
||||||
|
dis.dispatch({action: 'require_registration'});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!await enable4SIfNeeded()) {
|
if (!await enable4SIfNeeded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user