summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-09 14:33:25 +0100
committerGitHub <noreply@github.com>2019-12-09 14:33:25 +0100
commitb13da60da215422371ee029a3be4aa7782f0d905 (patch)
tree4485878e14e3c5e08202643d0b42ac9ed05ef26e
parent63a2725f3d38fe8e5e767cd62f65330776435811 (diff)
parentc0229768f2455f1d9fcd7b446625eb9ef6aeb03f (diff)
downloadnextcloud-server-b13da60da215422371ee029a3be4aa7782f0d905.tar.gz
nextcloud-server-b13da60da215422371ee029a3be4aa7782f0d905.zip
Merge pull request #18294 from nextcloud/fix/18020/get_share_for_recipient
Fetch the share for the recipient
-rw-r--r--apps/files_sharing/lib/Notification/Notifier.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php
index f273c0a87bc..84bd86b1e2d 100644
--- a/apps/files_sharing/lib/Notification/Notifier.php
+++ b/apps/files_sharing/lib/Notification/Notifier.php
@@ -58,6 +58,8 @@ class Notifier implements INotifier {
protected $userManager;
/** @var IURLGenerator */
protected $url;
+ /** @var string */
+ private $userId;
public function __construct(IFactory $l10nFactory,
@@ -65,13 +67,15 @@ class Notifier implements INotifier {
IRootFolder $rootFolder,
IGroupManager $groupManager,
IUserManager $userManager,
- IURLGenerator $url) {
+ IURLGenerator $url,
+ string $userId) {
$this->l10nFactory = $l10nFactory;
$this->shareManager = $shareManager;
$this->rootFolder = $rootFolder;
$this->groupManager = $groupManager;
$this->userManager = $userManager;
$this->url = $url;
+ $this->userId = $userId;
}
/**
@@ -113,7 +117,7 @@ class Notifier implements INotifier {
$attemptId = $notification->getObjectId();
try {
- $share = $this->shareManager->getShareById($attemptId);
+ $share = $this->shareManager->getShareById($attemptId, $this->userId);
} catch (ShareNotFound $e) {
throw new AlreadyProcessedException();
}