aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-01-21 13:42:04 +0100
committerJoas Schilling <coding@schilljs.com>2022-01-21 13:42:04 +0100
commit1ceba648635024c7b198d29239e23595347e7685 (patch)
treeab0411ed7f280c3c0ee00aebe5f3a50e7aa6ed6d /lib/public
parent5ad7309c5500f2ad16d51403f1fb6d491b070f70 (diff)
downloadnextcloud-server-1ceba648635024c7b198d29239e23595347e7685.tar.gz
nextcloud-server-1ceba648635024c7b198d29239e23595347e7685.zip
Allow to get comments with a given set of verbs
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Comments/ICommentsManager.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index 9aacf028b4e..781ec87892c 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -131,6 +131,7 @@ interface ICommentsManager {
* @param bool $includeLastKnown
* @return IComment[]
* @since 14.0.0
+ * @depreacted 24.0.0 - Use getCommentsWithVerbForObjectSinceComment instead
*/
public function getForObjectSince(
string $objectType,
@@ -142,6 +143,28 @@ interface ICommentsManager {
): array;
/**
+ * @param string $objectType the object type, e.g. 'files'
+ * @param string $objectId the id of the object
+ * @param string[] $verbs List of verbs to filter by
+ * @param int $lastKnownCommentId the last known comment (will be used as offset)
+ * @param string $sortDirection direction of the comments (`asc` or `desc`)
+ * @param int $limit optional, number of maximum comments to be returned. if
+ * set to 0, all comments are returned.
+ * @param bool $includeLastKnown
+ * @return IComment[]
+ * @since 24.0.0
+ */
+ public function getCommentsWithVerbForObjectSinceComment(
+ string $objectType,
+ string $objectId,
+ array $verbs,
+ int $lastKnownCommentId,
+ string $sortDirection = 'asc',
+ int $limit = 30,
+ bool $includeLastKnown = false
+ ): array;
+
+ /**
* Search for comments with a given content
*
* @param string $search content to search for
@@ -198,6 +221,7 @@ interface ICommentsManager {
* @param string $verb
* @return int
* @since 21.0.0
+ * @depreacted 24.0.0 - Use getNumberOfCommentsWithVerbsForObjectSinceComment instead
*/
public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int;