From e675c2a66c27605ff54a428e8f3ee76637649e25 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Jan 2017 11:18:33 +0100 Subject: Set the comment link on render instead of creation Signed-off-by: Joas Schilling --- apps/comments/lib/Notification/Listener.php | 6 +----- apps/comments/lib/Notification/Notifier.php | 6 +++++- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/comments') diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php index d30c59c93d5..2f94b8a3d75 100644 --- a/apps/comments/lib/Notification/Listener.php +++ b/apps/comments/lib/Notification/Listener.php @@ -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; } diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php index 170538512d8..a9daef3031f 100644 --- a/apps/comments/lib/Notification/Notifier.php +++ b/apps/comments/lib/Notification/Notifier.php @@ -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; -- cgit v1.2.3