Skip to content

Commit 88c72a1

Browse files
authored
Ignore m.3pid_changes for Identity service 3PID changes (#28375)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent d06cf09 commit 88c72a1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/components/views/settings/discovery/DiscoverySettings.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const DiscoverySettings: React.FC = () => {
5151
const [emails, setEmails] = useState<ThirdPartyIdentifier[]>([]);
5252
const [phoneNumbers, setPhoneNumbers] = useState<ThirdPartyIdentifier[]>([]);
5353
const [idServerName, setIdServerName] = useState<string | undefined>(abbreviateUrl(client.getIdentityServerUrl()));
54-
const [canMake3pidChanges, setCanMake3pidChanges] = useState<boolean>(false);
5554

5655
const [requiredPolicyInfo, setRequiredPolicyInfo] = useState<RequiredPolicyInfo>({
5756
// This object is passed along to a component for handling
@@ -88,11 +87,6 @@ export const DiscoverySettings: React.FC = () => {
8887
try {
8988
await getThreepidState();
9089

91-
const capabilities = await client.getCapabilities();
92-
setCanMake3pidChanges(
93-
!capabilities["m.3pid_changes"] || capabilities["m.3pid_changes"].enabled === true,
94-
);
95-
9690
// By starting the terms flow we get the logic for checking which terms the user has signed
9791
// for free. So we might as well use that for our own purposes.
9892
const idServerUrl = client.getIdentityServerUrl();
@@ -166,7 +160,7 @@ export const DiscoverySettings: React.FC = () => {
166160
medium={ThreepidMedium.Email}
167161
threepids={emails}
168162
onChange={getThreepidState}
169-
disabled={!canMake3pidChanges}
163+
disabled={!hasTerms}
170164
isLoading={isLoadingThreepids}
171165
/>
172166
</SettingsSubsection>
@@ -180,7 +174,7 @@ export const DiscoverySettings: React.FC = () => {
180174
medium={ThreepidMedium.Phone}
181175
threepids={phoneNumbers}
182176
onChange={getThreepidState}
183-
disabled={!canMake3pidChanges}
177+
disabled={!hasTerms}
184178
isLoading={isLoadingThreepids}
185179
/>
186180
</SettingsSubsection>

0 commit comments

Comments
 (0)