Revert "Release Sign in with QR out of labs (#10066)" (#10176)

This commit is contained in:
Hugh Nimmo-Smith 2023-02-16 12:10:52 +00:00 committed by GitHub
parent a3a2a0f914
commit f0359a5c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 12 deletions

View file

@ -20,6 +20,7 @@ import type { IServerVersions } from "matrix-js-sdk/src/matrix";
import { _t } from "../../../../languageHandler";
import AccessibleButton from "../../elements/AccessibleButton";
import SettingsSubsection from "../shared/SettingsSubsection";
import SettingsStore from "../../../../settings/SettingsStore";
interface IProps {
onShowQr: () => void;
@ -32,10 +33,12 @@ export default class LoginWithQRSection extends React.Component<IProps> {
}
public render(): JSX.Element | null {
// Needs server support for MSC3882 and MSC3886:
const msc3882Supported = !!this.props.versions?.unstable_features?.["org.matrix.msc3882"];
const msc3886Supported = !!this.props.versions?.unstable_features?.["org.matrix.msc3886"];
const offerShowQr = msc3882Supported && msc3886Supported;
// Needs to be enabled as a feature + server support MSC3886 or have a default rendezvous server configured:
const offerShowQr =
SettingsStore.getValue("feature_qr_signin_reciprocate_show") && msc3882Supported && msc3886Supported; // We don't support configuration of a fallback at the moment so we just check the MSCs
// don't show anything if no method is available
if (!offerShowQr) {