parent
a3a2a0f914
commit
f0359a5c18
9 changed files with 66 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue