Use the user from the notification
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
ac045a2461
commit
b86990988e
|
@ -58,24 +58,19 @@ class Notifier implements INotifier {
|
||||||
protected $userManager;
|
protected $userManager;
|
||||||
/** @var IURLGenerator */
|
/** @var IURLGenerator */
|
||||||
protected $url;
|
protected $url;
|
||||||
/** @var string */
|
|
||||||
private $userId;
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct(IFactory $l10nFactory,
|
public function __construct(IFactory $l10nFactory,
|
||||||
IManager $shareManager,
|
IManager $shareManager,
|
||||||
IRootFolder $rootFolder,
|
IRootFolder $rootFolder,
|
||||||
IGroupManager $groupManager,
|
IGroupManager $groupManager,
|
||||||
IUserManager $userManager,
|
IUserManager $userManager,
|
||||||
IURLGenerator $url,
|
IURLGenerator $url) {
|
||||||
string $userId) {
|
|
||||||
$this->l10nFactory = $l10nFactory;
|
$this->l10nFactory = $l10nFactory;
|
||||||
$this->shareManager = $shareManager;
|
$this->shareManager = $shareManager;
|
||||||
$this->rootFolder = $rootFolder;
|
$this->rootFolder = $rootFolder;
|
||||||
$this->groupManager = $groupManager;
|
$this->groupManager = $groupManager;
|
||||||
$this->userManager = $userManager;
|
$this->userManager = $userManager;
|
||||||
$this->url = $url;
|
$this->url = $url;
|
||||||
$this->userId = $userId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,7 +112,7 @@ class Notifier implements INotifier {
|
||||||
$attemptId = $notification->getObjectId();
|
$attemptId = $notification->getObjectId();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$share = $this->shareManager->getShareById($attemptId, $this->userId);
|
$share = $this->shareManager->getShareById($attemptId, $notification->getUser());
|
||||||
} catch (ShareNotFound $e) {
|
} catch (ShareNotFound $e) {
|
||||||
throw new AlreadyProcessedException();
|
throw new AlreadyProcessedException();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue