diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-10 13:21:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-10 13:21:39 -0500 |
commit | a045f3c4d7ef606ea302712952ec474d5ea5637a (patch) | |
tree | 4edf7b74e8220a4ed06fc1f3e9b2b7064e21cd6a /lib/public | |
parent | a750436ebc3a71f4fe34596cc0bdb1f9b61ba912 (diff) | |
parent | 11c1e5dd8641e38c44e49d0f527444be7f92da1b (diff) | |
download | nextcloud-server-a045f3c4d7ef606ea302712952ec474d5ea5637a.tar.gz nextcloud-server-a045f3c4d7ef606ea302712952ec474d5ea5637a.zip |
Merge pull request #4146 from nextcloud/unread-comments-folder
Allow getting the unread comment count for an entire folder at once
Diffstat (limited to 'lib/public')
-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). |