From 429f8ae0114350e9b0c0ff9fd57c9ebccaa6e7a8 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 29 Mar 2017 15:04:11 +0200 Subject: Allow getting the unread comment count for an entire folder at once Signed-off-by: Robin Appelman --- lib/public/Comments/ICommentsManager.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/public') 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 * @@ -125,6 +127,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 -- cgit v1.2.3