summaryrefslogtreecommitdiffstats
path: root/lib/public/Comments
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-04-10 10:50:57 +0200
committerJoas Schilling <coding@schilljs.com>2018-04-18 14:23:15 +0200
commitf50abde7ac99fd6f7563fb60b662ca21ac320f34 (patch)
treec43bb540e701b1bf09522abcce1b22207ac63d81 /lib/public/Comments
parent63dfbb2127ec9a930778dd5d31b640c5f2cc3652 (diff)
downloadnextcloud-server-f50abde7ac99fd6f7563fb60b662ca21ac320f34.tar.gz
nextcloud-server-f50abde7ac99fd6f7563fb60b662ca21ac320f34.zip
Add proper comment offset support
The offset is based on the last known comment instead of limit-offset, so new comments don't mess up requests which get the history of an object- Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Comments')
-rw-r--r--lib/public/Comments/ICommentsManager.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index bd9c4ff5ba6..888e7df3e7f 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -121,6 +121,23 @@ interface ICommentsManager {
);
/**
+ * @param string $objectType
+ * @param string $objectId
+ * @param int $lastKnownCommentId
+ * @param string $sortDirection
+ * @param int $limit
+ * @return array
+ * @since 14.0.0
+ */
+ public function getForObjectSince(
+ string $objectType,
+ string $objectId,
+ int $lastKnownCommentId,
+ string $sortDirection = 'asc',
+ int $limit = 30
+ ): array;
+
+ /**
* @param $objectType string the object type, e.g. 'files'
* @param $objectId string the id of the object
* @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments