Skip to content

Commit 36ed817

Browse files
ArtificialOwlbackportbot[bot]
authored andcommitted
feat(federated-share): forward notification only on remote reshare
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent 7765711 commit 36ed817

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ private function shareAccepted($id, array $notification) {
281281

282282
$this->verifyShare($share, $token);
283283
$this->executeAcceptShare($share);
284-
if ($share->getShareOwner() !== $share->getSharedBy()) {
284+
285+
if ($share->getShareOwner() !== $share->getSharedBy()
286+
&& !$this->userManager->userExists($share->getSharedBy())) {
287+
// only if share was initiated from another instance
285288
[, $remote] = $this->addressHandler->splitUserRemote($share->getSharedBy());
286289
$remoteId = $this->federatedShareProvider->getRemoteId($share);
287290
$notification = $this->cloudFederationFactory->getCloudFederationNotification();

0 commit comments

Comments
 (0)