crypto: Use OnlySigned isolation flag to setup decryption trust req.
This commit is contained in:
parent
d67fae8d4c
commit
457e116809
1 changed files with 8 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ import org.matrix.rustcomponents.sdk.SlidingSyncVersionBuilder
|
||||||
import org.matrix.rustcomponents.sdk.use
|
import org.matrix.rustcomponents.sdk.use
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import uniffi.matrix_sdk_crypto.CollectStrategy
|
import uniffi.matrix_sdk_crypto.CollectStrategy
|
||||||
|
import uniffi.matrix_sdk_crypto.TrustRequirement
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
@ -108,6 +109,13 @@ class RustMatrixClientFactory @Inject constructor(
|
||||||
CollectStrategy.DeviceBasedStrategy(onlyAllowTrustedDevices = false, errorOnVerifiedUserProblem = true)
|
CollectStrategy.DeviceBasedStrategy(onlyAllowTrustedDevices = false, errorOnVerifiedUserProblem = true)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
.roomDecryptionTrustRequirement(
|
||||||
|
trustRequirement = if (featureFlagService.isFeatureEnabled(FeatureFlags.OnlySignedDeviceIsolationMode)) {
|
||||||
|
TrustRequirement.CROSS_SIGNED_OR_LEGACY
|
||||||
|
} else {
|
||||||
|
TrustRequirement.UNTRUSTED
|
||||||
|
}
|
||||||
|
)
|
||||||
.run {
|
.run {
|
||||||
// Apply sliding sync version settings
|
// Apply sliding sync version settings
|
||||||
when (slidingSyncType) {
|
when (slidingSyncType) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue