Skip to content

Commit

Permalink
Use accountStateFromFileProviderDomainIdentifier method in authentica…
Browse files Browse the repository at this point in the history
…teExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra committed Jan 2, 2024
1 parent 300ae42 commit 4f59144
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gui/macOS/fileproviderxpc_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <QLoggingCategory>

#include "gui/accountmanager.h"
#include "gui/macOS/fileproviderdomainmanager.h"
#include "gui/macOS/fileproviderxpc_mac_utils.h"

namespace OCC::Mac {
Expand Down Expand Up @@ -48,9 +49,7 @@

void FileProviderXPC::authenticateExtension(const QString &extensionAccountId) const
{
const auto accountManager = AccountManager::instance();
Q_ASSERT(accountManager);
const auto accountState = accountManager->accountFromUserId(extensionAccountId);
const auto accountState = FileProviderDomainManager::accountStateFromFileProviderDomainIdentifier(extensionAccountId);
if (!accountState) {
qCWarning(lcFileProviderXPC) << "Account state is null for received account"
<< extensionAccountId;
Expand Down

0 comments on commit 4f59144

Please sign in to comment.