]> source.dussan.org Git - nextcloud-server.git/commitdiff
Set the comment link on render instead of creation
authorJoas Schilling <coding@schilljs.com>
Mon, 9 Jan 2017 10:18:33 +0000 (11:18 +0100)
committerJoas Schilling <coding@schilljs.com>
Mon, 9 Jan 2017 10:18:33 +0000 (11:18 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/comments/lib/Notification/Listener.php
apps/comments/lib/Notification/Notifier.php

index d30c59c93d5557750aea743f65a5949c543e5bb3..2f94b8a3d752050526530ec3357cbebe1d70fd21 100644 (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;
        }
index 170538512d8f3910f730adb92ea0e7a7b5fa8f0b..a9daef3031fca2567505ff7cc9245a704f30911d 100644 (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;