Fix missing implem

This commit is contained in:
valere 2023-05-11 10:48:28 +02:00
parent 7d9330b2ee
commit 1a1f6810e2
2 changed files with 11 additions and 17 deletions

View File

@ -44,7 +44,7 @@ internal class RustCrossSigningService @Inject constructor(
override suspend fun isCrossSigningVerified(): Boolean {
return when (val identity = olmMachine.getIdentity(olmMachine.userId())) {
is OwnUserIdentity -> identity.verified()
else -> false
else -> false
}
}
@ -177,7 +177,7 @@ internal class RustCrossSigningService @Inject constructor(
throw IllegalArgumentException("This device [$deviceId] is not known, or not yours")
}
} else {
throw IllegalArgumentException("This device [$deviceId] is not known")
throw IllegalArgumentException("This device [$deviceId] is not known")
}
}
@ -238,6 +238,6 @@ internal class RustCrossSigningService @Inject constructor(
override fun checkOtherMSKTrusted(myCrossSigningInfo: MXCrossSigningInfo?, otherInfo: MXCrossSigningInfo?): UserTrustResult {
// is this needed in rust? should be moved to internal API?
TODO()
UserTrustResult.Failure("Not used in rust")
}
}

View File

@ -241,12 +241,8 @@ class DefaultNavigator @Inject constructor(
}
if (context is AppCompatActivity) {
TODO()
// VerificationBottomSheet.withArgs(
// roomId = null,
// otherUserId = otherUserId,
// transactionId = sasTransactionId
// ).show(context.supportFragmentManager, "REQPOP")
SelfVerificationBottomSheet.forTransaction(tx.transactionId)
.show(context.supportFragmentManager, "VERIF")
}
}
}
@ -254,16 +250,14 @@ class DefaultNavigator @Inject constructor(
override fun requestSessionVerification(context: Context, otherSessionId: String) {
coroutineScope.launch {
val session = sessionHolder.getSafeActiveSession() ?: return@launch
// val pr =
session.cryptoService().verificationService().requestSelfKeyVerification(
supportedVerificationMethodsProvider.provide()
val request = session.cryptoService().verificationService().requestDeviceVerification(
supportedVerificationMethodsProvider.provide(),
session.myUserId,
otherSessionId
)
if (context is AppCompatActivity) {
TODO()
// VerificationBottomSheet.withArgs(
// otherUserId = session.myUserId,
// transactionId = pr.requestId()
// ).show(context.supportFragmentManager)
SelfVerificationBottomSheet.forTransaction(request.transactionId)
.show(context.supportFragmentManager, "VERIF")
}
}
}