diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php index 3c669a226b405..a240d488305f4 100644 --- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php +++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php @@ -308,7 +308,10 @@ private function shareAccepted($id, array $notification) { $this->verifyShare($share, $token); $this->executeAcceptShare($share); - if ($share->getShareOwner() !== $share->getSharedBy()) { + + if ($share->getShareOwner() !== $share->getSharedBy() + && !$this->userManager->userExists($share->getSharedBy())) { + // only if share was initiated from another instance [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedBy()); $remoteId = $this->federatedShareProvider->getRemoteId($share); $notification = $this->cloudFederationFactory->getCloudFederationNotification();