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
8a4d0c7bee
commit
7aa564e74d
27 changed files with 195 additions and 341 deletions
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 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.matrix.api.auth
|
||||
|
||||
/**
|
||||
* Checks the homeserver's compatibility with Element X.
|
||||
*/
|
||||
interface HomeServerLoginCompatibilityChecker {
|
||||
/**
|
||||
* Performs the compatibility check given the homeserver's [url].
|
||||
* @return a `true` value if the homeserver is compatible, `false` if not, or a failure result if the check unexpectedly failed.
|
||||
*/
|
||||
suspend fun check(url: String): Result<Boolean>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue