Skip to content

Commit

Permalink
crypto: Use OnlySigned isolation flag to setup decryption trust req.
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Oct 4, 2024
1 parent 39d7084 commit 813ed4b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import org.matrix.rustcomponents.sdk.SlidingSyncVersionBuilder
import org.matrix.rustcomponents.sdk.use
import timber.log.Timber
import uniffi.matrix_sdk_crypto.CollectStrategy
import uniffi.matrix_sdk_crypto.TrustRequirement
import java.io.File
import javax.inject.Inject

Expand Down Expand Up @@ -108,6 +109,13 @@ class RustMatrixClientFactory @Inject constructor(
CollectStrategy.DeviceBasedStrategy(onlyAllowTrustedDevices = false, errorOnVerifiedUserProblem = true)
}
)
.roomDecryptionTrustRequirement(
trustRequirement = if (featureFlagService.isFeatureEnabled(FeatureFlags.OnlySignedDeviceIsolationMode)) {
TrustRequirement.CROSS_SIGNED_OR_LEGACY
} else {
TrustRequirement.UNTRUSTED
}
)
.run {
// Apply sliding sync version settings
when (slidingSyncType) {
Expand Down

0 comments on commit 813ed4b

Please sign in to comment.