Adopt sliding sync versions for client Restoration.
This commit is contained in:
@@ -88,7 +88,6 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
|
||||
do {
|
||||
Self.userSession = try await NSEUserSession(credentials: credentials,
|
||||
clientSessionDelegate: keychainController,
|
||||
simplifiedSlidingSyncEnabled: settings.simplifiedSlidingSyncEnabled,
|
||||
appHooks: appHooks)
|
||||
} catch {
|
||||
MXLog.error("Failed creating user session with error: \(error)")
|
||||
|
||||
@@ -18,7 +18,6 @@ import Foundation
|
||||
|
||||
protocol NSESettingsProtocol {
|
||||
var logLevel: TracingConfiguration.LogLevel { get }
|
||||
var simplifiedSlidingSyncEnabled: Bool { get }
|
||||
}
|
||||
|
||||
extension AppSettings: NSESettingsProtocol { }
|
||||
|
||||
@@ -26,7 +26,7 @@ final class NSEUserSession {
|
||||
networkMonitor: nil)
|
||||
private let delegateHandle: TaskHandle?
|
||||
|
||||
init(credentials: KeychainCredentials, clientSessionDelegate: ClientSessionDelegate, simplifiedSlidingSyncEnabled: Bool, appHooks: AppHooks) async throws {
|
||||
init(credentials: KeychainCredentials, clientSessionDelegate: ClientSessionDelegate, appHooks: AppHooks) async throws {
|
||||
userID = credentials.userID
|
||||
if credentials.restorationToken.passphrase != nil {
|
||||
MXLog.info("Restoring client with encrypted store.")
|
||||
@@ -36,7 +36,7 @@ final class NSEUserSession {
|
||||
let clientBuilder = ClientBuilder
|
||||
.baseBuilder(setupEncryption: false,
|
||||
httpProxy: URL(string: homeserverURL)?.globalProxy,
|
||||
slidingSync: simplifiedSlidingSyncEnabled ? .simplified : .restored,
|
||||
slidingSync: .restored,
|
||||
sessionDelegate: clientSessionDelegate,
|
||||
appHooks: appHooks)
|
||||
.sessionPaths(dataPath: credentials.restorationToken.sessionDirectory.path(percentEncoded: false),
|
||||
|
||||
Reference in New Issue
Block a user