Merge branch 'develop' into feature/fga/user_status_last_pieces

This commit is contained in:
ganfra
2026-08-11 10:04:18 +02:00
56 changed files with 715 additions and 115 deletions
@@ -11,6 +11,8 @@ package io.element.android.libraries.matrix.api.auth
import io.element.android.libraries.matrix.api.BuildConfig
object OAuthConfig {
// This *can* be null if the build time config field is not set
@Suppress("UNNECESSARY_SAFE_CALL")
val CLIENT_URI = BuildConfig.OAUTH_CLIENT_URI_PATH?.let {
// Concatenate the base URI and the path, ensuring there is exactly one '/' between them
"${BuildConfig.CLIENT_URI.trimEnd('/')}/${it.trimStart('/')}"
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2026 Element Creations 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.linknewdevice
interface ContinuationMessageSender {
suspend fun cancel(): Result<Unit>
suspend fun confirm(): Result<Unit>
}
@@ -18,8 +18,10 @@ interface LinkDesktopHandler {
sealed interface LinkDesktopStep {
data object Uninitialized : LinkDesktopStep
data object Starting : LinkDesktopStep
data class WaitingForAuth(
val verificationUri: String,
val continuationMessageSender: ContinuationMessageSender,
) : LinkDesktopStep
data class EstablishingSecureChannel(
@@ -22,7 +22,12 @@ sealed interface LinkMobileStep {
data object Starting : LinkMobileStep
data class QrReady(val data: String) : LinkMobileStep
data object QrRotating : LinkMobileStep
data class WaitingForAuth(val verificationUri: String) : LinkMobileStep
data class WaitingForAuth(
val verificationUri: String,
val continuationMessageSender: ContinuationMessageSender,
) : LinkMobileStep
data class QrScanned(val checkCodeSender: CheckCodeSender) : LinkMobileStep
data class Error(val errorType: ErrorType) : LinkMobileStep
data object SyncingSecrets : LinkMobileStep