From fab6d92f300dee076c2027c00ef982d2c13167bc Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Fri, 11 Jul 2025 23:02:03 +0200 Subject: [PATCH] feat(federated-share): forward notification only on remote reshare Signed-off-by: Maxence Lange --- .../lib/OCM/CloudFederationProviderFiles.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php index 1cdcdbdd6d4f6..1ce639532e842 100644 --- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php +++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php @@ -309,7 +309,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();