Use the SDK Client to check whether a homeserver is compatible (#5664)
* Use the SDK `Client` to check whether a HS is compatible * Remove usage of unused `WellKnown`, keep `ElementWellKnown` * Make `HomeServerLoginCompatibilityChecker.check` return `true/false` values to distinguish non-valid homeservers from a failed check * Use `inMemoryStore` and `serverNameOrHomeserverUrl` * Do some cleanup of `isValid` and `isWellknownValid` * Make the debounce for starting the search a bit higher, as checking for the homeservers seems more resource-intensive now
This commit is contained in:
parent
0061b625f1
commit
015b497d5a
27 changed files with 195 additions and 341 deletions
|
|
@ -8,6 +8,5 @@
|
|||
package io.element.android.libraries.wellknown.api
|
||||
|
||||
interface SessionWellknownRetriever {
|
||||
suspend fun getWellKnown(): WellknownRetrieverResult<WellKnown>
|
||||
suspend fun getElementWellKnown(): WellknownRetrieverResult<ElementWellKnown>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
* Copyright 2023, 2024 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.wellknown.api
|
||||
|
||||
data class WellKnown(
|
||||
val homeServer: WellKnownBaseConfig?,
|
||||
val identityServer: WellKnownBaseConfig?,
|
||||
)
|
||||
|
||||
data class WellKnownBaseConfig(
|
||||
val baseURL: String?
|
||||
)
|
||||
|
|
@ -8,6 +8,5 @@
|
|||
package io.element.android.libraries.wellknown.api
|
||||
|
||||
interface WellknownRetriever {
|
||||
suspend fun getWellKnown(baseUrl: String): WellknownRetrieverResult<WellKnown>
|
||||
suspend fun getElementWellKnown(baseUrl: String): WellknownRetrieverResult<ElementWellKnown>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue