@@ -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