Skip to content

Commit

Permalink
Catch address exception for local users
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Nov 23, 2018
1 parent a4f4e73 commit 39ca2fc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/federatedfilesharing/lib/FedShareManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,15 @@ public function updatePermissions(IShare $share, $permissions) {
*/
protected function notifyRemote($share, $callback) {
if ($share->getShareOwner() !== $share->getSharedBy()) {
list(, $remote) = $this->addressHandler->splitUserRemote(
$share->getSharedBy()
);
$remoteId = $this->federatedShareProvider->getRemoteId($share);
$callback($remote, $remoteId, $share->getToken());
try {
list(, $remote) = $this->addressHandler->splitUserRemote(
$share->getSharedBy()
);
$remoteId = $this->federatedShareProvider->getRemoteId($share);
$callback($remote, $remoteId, $share->getToken());
} catch (\Exception $e) {
// expected fail if sender is a local user
}
}
}

Expand Down

0 comments on commit 39ca2fc

Please sign in to comment.