Set the comment link on render instead of creation

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-01-09 11:18:33 +01:00
parent 4f9ff96f79
commit e675c2a66c
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with 6 additions and 6 deletions

View File

@ -100,11 +100,7 @@ class Listener {
->setApp('comments')
->setObject('comment', $comment->getId())
->setSubject('mention', [ $comment->getObjectType(), $comment->getObjectId() ])
->setDateTime($comment->getCreationDateTime())
->setLink($this->urlGenerator->linkToRouteAbsolute(
'comments.Notifications.view',
['id' => $comment->getId()])
);
->setDateTime($comment->getCreationDateTime());
return $notification;
}

View File

@ -139,7 +139,11 @@ class Notifier implements INotifier {
]
);
}
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg')));
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg')))
->setLink($this->url->linkToRouteAbsolute(
'comments.Notifications.view',
['id' => $comment->getId()])
);
return $notification;
break;