mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-18 09:01:09 +01:00
Ignore m.3pid_changes for Identity service 3PID changes (#28375)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
d06cf09bf0
commit
88c72a1514
@ -51,7 +51,6 @@ export const DiscoverySettings: React.FC = () => {
|
|||||||
const [emails, setEmails] = useState<ThirdPartyIdentifier[]>([]);
|
const [emails, setEmails] = useState<ThirdPartyIdentifier[]>([]);
|
||||||
const [phoneNumbers, setPhoneNumbers] = useState<ThirdPartyIdentifier[]>([]);
|
const [phoneNumbers, setPhoneNumbers] = useState<ThirdPartyIdentifier[]>([]);
|
||||||
const [idServerName, setIdServerName] = useState<string | undefined>(abbreviateUrl(client.getIdentityServerUrl()));
|
const [idServerName, setIdServerName] = useState<string | undefined>(abbreviateUrl(client.getIdentityServerUrl()));
|
||||||
const [canMake3pidChanges, setCanMake3pidChanges] = useState<boolean>(false);
|
|
||||||
|
|
||||||
const [requiredPolicyInfo, setRequiredPolicyInfo] = useState<RequiredPolicyInfo>({
|
const [requiredPolicyInfo, setRequiredPolicyInfo] = useState<RequiredPolicyInfo>({
|
||||||
// This object is passed along to a component for handling
|
// This object is passed along to a component for handling
|
||||||
@ -88,11 +87,6 @@ export const DiscoverySettings: React.FC = () => {
|
|||||||
try {
|
try {
|
||||||
await getThreepidState();
|
await getThreepidState();
|
||||||
|
|
||||||
const capabilities = await client.getCapabilities();
|
|
||||||
setCanMake3pidChanges(
|
|
||||||
!capabilities["m.3pid_changes"] || capabilities["m.3pid_changes"].enabled === true,
|
|
||||||
);
|
|
||||||
|
|
||||||
// By starting the terms flow we get the logic for checking which terms the user has signed
|
// By starting the terms flow we get the logic for checking which terms the user has signed
|
||||||
// for free. So we might as well use that for our own purposes.
|
// for free. So we might as well use that for our own purposes.
|
||||||
const idServerUrl = client.getIdentityServerUrl();
|
const idServerUrl = client.getIdentityServerUrl();
|
||||||
@ -166,7 +160,7 @@ export const DiscoverySettings: React.FC = () => {
|
|||||||
medium={ThreepidMedium.Email}
|
medium={ThreepidMedium.Email}
|
||||||
threepids={emails}
|
threepids={emails}
|
||||||
onChange={getThreepidState}
|
onChange={getThreepidState}
|
||||||
disabled={!canMake3pidChanges}
|
disabled={!hasTerms}
|
||||||
isLoading={isLoadingThreepids}
|
isLoading={isLoadingThreepids}
|
||||||
/>
|
/>
|
||||||
</SettingsSubsection>
|
</SettingsSubsection>
|
||||||
@ -180,7 +174,7 @@ export const DiscoverySettings: React.FC = () => {
|
|||||||
medium={ThreepidMedium.Phone}
|
medium={ThreepidMedium.Phone}
|
||||||
threepids={phoneNumbers}
|
threepids={phoneNumbers}
|
||||||
onChange={getThreepidState}
|
onChange={getThreepidState}
|
||||||
disabled={!canMake3pidChanges}
|
disabled={!hasTerms}
|
||||||
isLoading={isLoadingThreepids}
|
isLoading={isLoadingThreepids}
|
||||||
/>
|
/>
|
||||||
</SettingsSubsection>
|
</SettingsSubsection>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user