Drop support for the legacy session directory and optional store encryption.

Store encryption became mandatory in #2692
Rust's sessionPath replaced the legacy session directory in #2903
Native sliding sync migration resulted in new restoration tokens for new users in #3071 and later for all users by #3801.
This commit is contained in:
Doug
2025-07-30 12:53:38 +01:00
committed by Doug
parent 4d365e3fd7
commit 5242e7fb6c
8 changed files with 27 additions and 88 deletions
@@ -127,13 +127,16 @@ class KeychainControllerTests: XCTestCase {
XCTAssertTrue(underlyingKeychain.allKeys().isEmpty, "The keychain should be empty to begin with.")
do {
let unsupportedToken = RestorationTokenV1(session: SessionV1(accessToken: "1234",
let unsupportedToken = RestorationTokenV4(session: SessionV1(accessToken: "1234",
refreshToken: nil,
userId: "@test:example.com",
deviceId: "D3V1C3",
homeserverUrl: "https://matrix.example.com",
oidcData: nil,
slidingSyncVersion: .proxy(url: "https://sync.example.com")))
slidingSyncVersion: .proxy(url: "https://sync.example.com")),
sessionDirectory: .sessionsBaseDirectory.appending(component: UUID().uuidString),
passphrase: "passphrase",
pusherNotificationClientIdentifier: "pusherClientID")
let tokenData = try JSONEncoder().encode(unsupportedToken)
try underlyingKeychain.set(tokenData, key: "@test:example.com")
XCTAssertEqual(underlyingKeychain.allKeys().count, 1)