aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/comments
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-05 16:30:37 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-05 16:30:37 +0100
commitd2a495f19090e68b531710a861c6e1ae2b390189 (patch)
tree3f591325ad2804cf277442fef3fc04cb9df1cbd2 /apps/dav/lib/comments
parent0196f0e54643e3a0b17588cb9f4c54d7d73c5b29 (diff)
downloadnextcloud-server-d2a495f19090e68b531710a861c6e1ae2b390189.tar.gz
nextcloud-server-d2a495f19090e68b531710a861c6e1ae2b390189.zip
Mark own comments as read after posting
Diffstat (limited to 'apps/dav/lib/comments')
-rw-r--r--apps/dav/lib/comments/commentsplugin.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/comments/commentsplugin.php b/apps/dav/lib/comments/commentsplugin.php
index 282c14df1e8..56d94cc33e9 100644
--- a/apps/dav/lib/comments/commentsplugin.php
+++ b/apps/dav/lib/comments/commentsplugin.php
@@ -116,6 +116,11 @@ class CommentsPlugin extends ServerPlugin {
$data,
$request->getHeader('Content-Type')
);
+
+ // update read marker for the current user/poster to avoid
+ // having their own comments marked as unread
+ $node->setReadMarker(null);
+
$url = $request->getUrl() . '/' . urlencode($comment->getId());
$response->setHeader('Content-Location', $url);