File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
apps/federatedfilesharing/lib Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -329,8 +329,16 @@ public function update(IShare $share): IShare {
329329 ->set ('expiration ' , $ qb ->createNamedParameter ($ share ->getExpirationDate (), IQueryBuilder::PARAM_DATETIME_MUTABLE ))
330330 ->executeStatement ();
331331
332- // send the updated permission to the owner/initiator, if they are not the same
333- if ($ share ->getShareOwner () !== $ share ->getSharedBy ()) {
332+ /*
333+ * If the share owner and share initiator are on the same instance,
334+ * then we're done here as the share was just updated above.
335+ *
336+ * However, if the share owner is on a remote instance (and thus we're dealing with a federated share),
337+ * then we are supposed to let the share owner on the remote instance know.
338+ */
339+ $ ownerIsLocal = $ this ->userManager ->userExists ($ share ->getShareOwner ());
340+
341+ if (!$ ownerIsLocal ) {
334342 $ this ->sendPermissionUpdate ($ share );
335343 }
336344
You can’t perform that action at this time.
0 commit comments