Skip to content

Commit

Permalink
crypto: quick refactor to setup key share strategy at same place
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Sep 10, 2024
1 parent 5bb0cec commit a1e5739
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ElementX/Sources/Other/Extensions/ClientBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ extension ClientBuilder {
.enableCrossProcessRefreshLock(processId: InfoPlistReader.main.bundleIdentifier, sessionDelegate: sessionDelegate)
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
.requestConfig(config: .init(retryLimit: 0, timeout: 30000, maxConcurrentRequests: nil, retryTimeout: nil))
.roomKeyRecipientStrategy(strategy: .deviceBasedStrategy(onlyAllowTrustedDevices: false, errorOnVerifiedUserProblem: true))

builder = switch slidingSync {
case .restored: builder
Expand All @@ -37,6 +36,8 @@ extension ClientBuilder {

if appSettings.invisibleCryptoEnabled {
builder = builder.roomKeyRecipientStrategy(strategy: CollectStrategy.identityBasedStrategy)
} else {
builder = builder.roomKeyRecipientStrategy(strategy: .deviceBasedStrategy(onlyAllowTrustedDevices: false, errorOnVerifiedUserProblem: true))
}
}

Expand Down

0 comments on commit a1e5739

Please sign in to comment.