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 1, 2024
1 parent 3001efb commit 81fe094
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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 @@ -107,6 +108,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 81fe094

Please sign in to comment.