diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-18 08:37:03 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-18 08:37:03 +0100 |
commit | b86990988ef676b3c09eb8403745e484c9d954e4 (patch) | |
tree | b6c39c6634ca2a30e9d8d0231f83e9a898c3bde4 /apps | |
parent | ac045a2461c3532d6c6ca6c33033871b1b0e1dc1 (diff) | |
download | nextcloud-server-b86990988ef676b3c09eb8403745e484c9d954e4.tar.gz nextcloud-server-b86990988ef676b3c09eb8403745e484c9d954e4.zip |
Use the user from the notification
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-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(); } |