Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-03-29 16:04:11 +0300
committerRobin Appelman <robin@icewind.nl>2017-03-30 13:48:24 +0300
commit429f8ae0114350e9b0c0ff9fd57c9ebccaa6e7a8 (patch)
tree7d8c2e624e8840a26d04cfa75125eb039e7be5fd /lib/public/Comments
parent1ee7e1c0b128b16c3327ca6aa90335ce12fd678f (diff)
Allow getting the unread comment count for an entire folder at once
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/Comments')
-rw-r--r--lib/public/Comments/ICommentsManager.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index b43d5e8800b..f088ad9f70d 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -23,6 +23,8 @@
*/
namespace OCP\Comments;
+use OCP\IUser;
+
/**
* Interface ICommentsManager
*
@@ -126,6 +128,16 @@ interface ICommentsManager {
public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null);
/**
+ * Get the number of unread comments for all files in a folder
+ *
+ * @param int $folderId
+ * @param IUser $user
+ * @return array [$fileId => $unreadCount]
+ * @since 12.0.0
+ */
+ public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user);
+
+ /**
* creates a new comment and returns it. At this point of time, it is not
* saved in the used data storage. Use save() after setting other fields
* of the comment (e.g. message or verb).