From 88c72a15146048a07053fdc08054f5250b1b8f43 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 6 Nov 2024 14:33:50 +0000 Subject: [PATCH] Ignore `m.3pid_changes` for Identity service 3PID changes (#28375) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/settings/discovery/DiscoverySettings.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/views/settings/discovery/DiscoverySettings.tsx b/src/components/views/settings/discovery/DiscoverySettings.tsx index d240d53d7c..6fbc91874c 100644 --- a/src/components/views/settings/discovery/DiscoverySettings.tsx +++ b/src/components/views/settings/discovery/DiscoverySettings.tsx @@ -51,7 +51,6 @@ export const DiscoverySettings: React.FC = () => { const [emails, setEmails] = useState([]); const [phoneNumbers, setPhoneNumbers] = useState([]); const [idServerName, setIdServerName] = useState(abbreviateUrl(client.getIdentityServerUrl())); - const [canMake3pidChanges, setCanMake3pidChanges] = useState(false); const [requiredPolicyInfo, setRequiredPolicyInfo] = useState({ // This object is passed along to a component for handling @@ -88,11 +87,6 @@ export const DiscoverySettings: React.FC = () => { try { 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 // for free. So we might as well use that for our own purposes. const idServerUrl = client.getIdentityServerUrl(); @@ -166,7 +160,7 @@ export const DiscoverySettings: React.FC = () => { medium={ThreepidMedium.Email} threepids={emails} onChange={getThreepidState} - disabled={!canMake3pidChanges} + disabled={!hasTerms} isLoading={isLoadingThreepids} /> @@ -180,7 +174,7 @@ export const DiscoverySettings: React.FC = () => { medium={ThreepidMedium.Phone} threepids={phoneNumbers} onChange={getThreepidState} - disabled={!canMake3pidChanges} + disabled={!hasTerms} isLoading={isLoadingThreepids} />