diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-12-18 13:16:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-18 13:16:06 +0100 |
commit | c44fd46c8c08c0085fc7bdc13141e10c8c33802a (patch) | |
tree | 9d931c40eb65e0fbb63f28988ff118b2cab63fa6 | |
parent | 65929e1fcfc8a53d4904140cc1dfb935e8f358c2 (diff) | |
parent | b86990988ef676b3c09eb8403745e484c9d954e4 (diff) | |
download | nextcloud-server-c44fd46c8c08c0085fc7bdc13141e10c8c33802a.tar.gz nextcloud-server-c44fd46c8c08c0085fc7bdc13141e10c8c33802a.zip |
Merge pull request #18457 from nextcloud/fix/sharing/notifier/uid
Use the user from the notification
-rw-r--r-- | apps/files_sharing/lib/Notification/Notifier.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index 84bd86b1e2d..6cfa45a649c 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -58,24 +58,19 @@ class Notifier implements INotifier { protected $userManager; /** @var IURLGenerator */ protected $url; - /** @var string */ - private $userId; - public function __construct(IFactory $l10nFactory, IManager $shareManager, IRootFolder $rootFolder, IGroupManager $groupManager, IUserManager $userManager, - IURLGenerator $url, - string $userId) { + IURLGenerator $url) { $this->l10nFactory = $l10nFactory; $this->shareManager = $shareManager; $this->rootFolder = $rootFolder; $this->groupManager = $groupManager; $this->userManager = $userManager; $this->url = $url; - $this->userId = $userId; } /** @@ -117,7 +112,7 @@ class Notifier implements INotifier { $attemptId = $notification->getObjectId(); try { - $share = $this->shareManager->getShareById($attemptId, $this->userId); + $share = $this->shareManager->getShareById($attemptId, $notification->getUser()); } catch (ShareNotFound $e) { throw new AlreadyProcessedException(); } |