Update regarding SDK change on verification data
This commit is contained in:
+19
-2
@@ -16,7 +16,24 @@
|
||||
|
||||
package io.element.android.libraries.matrix.api.verification
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
|
||||
@Immutable
|
||||
sealed interface SessionVerificationData {
|
||||
data class Emojis(
|
||||
// 7 emojis
|
||||
val emojis: List<VerificationEmoji>,
|
||||
) : SessionVerificationData
|
||||
|
||||
data class Decimals(
|
||||
// 3 numbers
|
||||
val decimals: List<Int>,
|
||||
) : SessionVerificationData
|
||||
}
|
||||
|
||||
// https://spec.matrix.org/unstable/client-server-api/#sas-method-emoji
|
||||
data class VerificationEmoji(
|
||||
val code: Int,
|
||||
val name: String,
|
||||
val number: Int,
|
||||
val emoji: String,
|
||||
val description: String,
|
||||
)
|
||||
+2
-2
@@ -101,8 +101,8 @@ sealed interface VerificationFlowState {
|
||||
/** Short Authentication String (SAS) verification started between the 2 devices. */
|
||||
data object StartedSasVerification : VerificationFlowState
|
||||
|
||||
/** Verification data for the SAS verification (emojis) received. */
|
||||
data class ReceivedVerificationData(val emoji: ImmutableList<VerificationEmoji>) : VerificationFlowState
|
||||
/** Verification data for the SAS verification received. */
|
||||
data class ReceivedVerificationData(val data: SessionVerificationData) : VerificationFlowState
|
||||
|
||||
/** Verification completed successfully. */
|
||||
data object Finished : VerificationFlowState
|
||||
|
||||
Reference in New Issue
Block a user