Merge pull request #18294 from nextcloud/fix/18020/get_share_for_recipient
Fetch the share for the recipient
This commit is contained in:
commit
b13da60da2
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue