VerificationService

interface VerificationService

https://matrix.org/docs/spec/client_server/r0.5.0#key-verification-framework

Verifying keys manually by reading out the Ed25519 key is not very user friendly, and can lead to errors. Verification is a user-friendly key verification process. Verification is intended to be a highly interactive process for users, and as such exposes verification methods which are easier for users to use.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface Listener

Functions

Link copied to clipboard
abstract suspend fun cancelVerificationRequest(request: PendingVerificationRequest)
abstract suspend fun cancelVerificationRequest(otherUserId: String, transactionId: String)
Link copied to clipboard
abstract suspend fun declineVerificationRequestInDMs(    otherUserId: String,     transactionId: String,     roomId: String)
Link copied to clipboard
abstract suspend fun getExistingTransaction(otherUserId: String, tid: String): VerificationTransaction?
Link copied to clipboard
abstract suspend fun getExistingVerificationRequest(otherUserId: String, tid: String?): PendingVerificationRequest?
Link copied to clipboard
abstract suspend fun getExistingVerificationRequestInRoom(roomId: String, tid: String): PendingVerificationRequest?
Link copied to clipboard
abstract suspend fun getExistingVerificationRequests(otherUserId: String): List<PendingVerificationRequest>
Link copied to clipboard
abstract suspend fun markedLocallyAsManuallyVerified(userId: String, deviceID: String)

Mark this device as verified manually.

abstract suspend fun onPotentiallyInterestingEventRoomFailToDecrypt(event: Event)
Link copied to clipboard
abstract suspend fun readyPendingVerification(    methods: List<VerificationMethod>,     otherUserId: String,     transactionId: String): Boolean

You should call this method after receiving a verification request. Accept the verification request advertising the given methods as supported Returns false if the request is unknown or transaction is not ready.

Link copied to clipboard
abstract suspend fun reciprocateQRVerification(    otherUserId: String,     requestId: String,     scannedData: String): String?
Link copied to clipboard
abstract suspend fun requestDeviceVerification(    methods: List<VerificationMethod>,     otherUserId: String,     otherDeviceId: String?): PendingVerificationRequest

Request an interactive verification to begin

Link copied to clipboard
abstract fun requestEventFlow(): Flow<VerificationEvent>
Link copied to clipboard
abstract suspend fun requestKeyVerificationInDMs(    methods: List<VerificationMethod>,     otherUserId: String,     roomId: String,     localId: String? = LocalEcho.createLocalEchoId()): PendingVerificationRequest

Request key verification with another user via room events (instead of the to-device API).

Link copied to clipboard
abstract suspend fun requestSelfKeyVerification(methods: List<VerificationMethod>): PendingVerificationRequest

Request a self key verification using to-device API (instead of room events).

Link copied to clipboard
abstract suspend fun startKeyVerification(    method: VerificationMethod,     otherUserId: String,     requestId: String): String?