diff options
author | Joas Schilling <coding@schilljs.com> | 2017-01-09 11:18:33 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-01-09 11:18:33 +0100 |
commit | e675c2a66c27605ff54a428e8f3ee76637649e25 (patch) | |
tree | cdf8243a72a43e9957d65d4df5ba58a925c9cbe2 /apps/comments | |
parent | 4f9ff96f79749e5d2cb6283a52475faf7145c71d (diff) | |
download | nextcloud-server-e675c2a66c27605ff54a428e8f3ee76637649e25.tar.gz nextcloud-server-e675c2a66c27605ff54a428e8f3ee76637649e25.zip |
Set the comment link on render instead of creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/comments')
-rw-r--r-- | apps/comments/lib/Notification/Listener.php | 6 | ||||
-rw-r--r-- | apps/comments/lib/Notification/Notifier.php | 6 |
2 files changed, 6 insertions, 6 deletions
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; |