diff options
author | Robin Appelman <robin@icewind.nl> | 2017-03-29 16:04:11 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-03-30 13:48:24 +0300 |
commit | 429f8ae0114350e9b0c0ff9fd57c9ebccaa6e7a8 (patch) | |
tree | 7d8c2e624e8840a26d04cfa75125eb039e7be5fd /lib/public/Comments | |
parent | 1ee7e1c0b128b16c3327ca6aa90335ce12fd678f (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.php | 12 |
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). |