Merge branch 'develop' into feature/bma/metro070

This commit is contained in:
Benoit Marty 2025-10-23 11:30:25 +02:00 committed by GitHub
commit 76493f52ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 306 additions and 233 deletions

View file

@ -39,7 +39,7 @@ class DefaultAccountProviderAccessControl(
// Ensure that Element Pro is not required for this account provider
val wellKnown = wellknownRetriever.getElementWellKnown(
baseUrl = accountProviderUrl.ensureProtocol(),
)
).dataOrNull()
if (wellKnown?.enforceElementPro == true) {
throw AccountProviderAccessException.NeedElementProException(
unauthorisedAccountProviderTitle = title,

View file

@ -46,7 +46,7 @@ class HomeserverResolver(
wellknownRetriever.getWellKnown(url)
}
}
val isValid = wellKnown?.isValid().orFalse()
val isValid = wellKnown?.dataOrNull()?.isValid().orFalse()
if (isValid) {
// Emit the list as soon as possible
currentList.add(

View file

@ -28,7 +28,7 @@ class DefaultWebClientUrlForAuthenticationRetriever(
Timber.w("Temporary account creation flow is only supported on matrix.org")
throw AccountCreationNotSupported()
}
val wellknown = wellknownRetriever.getElementWellKnown(homeServerUrl)
val wellknown = wellknownRetriever.getElementWellKnown(homeServerUrl).dataOrNull()
?: throw AccountCreationNotSupported()
val registrationHelperUrl = wellknown.registrationHelperUrl
return if (registrationHelperUrl != null) {