Correctly set up NCKit instance with account string
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 16 Apr 2024 10:22:53 +0000 (18:22 +0800)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 17 Apr 2024 08:44:12 +0000 (08:44 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+ClientInterface.swift

index 3d2f30a54a0c8138c61a02dc204fc9331c9069f1..32302fea52c685811a97bf9ecf92283ed40fc311 100644 (file)
@@ -94,10 +94,11 @@ extension FileProviderExtension: NSFileProviderServicing {
         guard newNcAccount != ncAccount else { return }
         ncAccount = newNcAccount
         ncKit.setup(
-            user: ncAccount!.username,
-            userId: ncAccount!.username,
-            password: ncAccount!.password,
-            urlBase: ncAccount!.serverUrl,
+            account: newNcAccount.ncKitAccount,
+            user: newNcAccount.username,
+            userId: newNcAccount.username,
+            password: newNcAccount.password,
+            urlBase: newNcAccount.serverUrl,
             userAgent: "Nextcloud-macOS/FileProviderExt",
             nextcloudVersion: 25,
             delegate: nil) // TODO: add delegate methods for self