summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-01-09 11:18:33 +0100
committerJoas Schilling <coding@schilljs.com>2017-01-09 11:18:33 +0100
commite675c2a66c27605ff54a428e8f3ee76637649e25 (patch)
treecdf8243a72a43e9957d65d4df5ba58a925c9cbe2 /apps/comments
parent4f9ff96f79749e5d2cb6283a52475faf7145c71d (diff)
downloadnextcloud-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.php6
-rw-r--r--apps/comments/lib/Notification/Notifier.php6
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;