From 2cc35cc65d251ac52e1e09fe52381ccbf64eb89f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 09:08:48 +0200 Subject: [PATCH 01/10] Include an option to also include the lastKnownCommentId object Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 10 +++++++--- lib/public/Comments/ICommentsManager.php | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 3c9be9828d..dc449cc4d4 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -395,6 +395,7 @@ class Manager implements ICommentsManager { * @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[] * @return array */ @@ -403,7 +404,8 @@ class Manager implements ICommentsManager { string $objectId, int $lastKnownCommentId, string $sortDirection = 'asc', - int $limit = 30 + int $limit = 30, + bool $includeLastKnown = false ): array { $comments = []; @@ -427,6 +429,7 @@ class Manager implements ICommentsManager { if ($lastKnownComment instanceof IComment) { $lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime(); if ($sortDirection === 'desc') { + $idComparison = $includeLastKnown ? 'lte' : 'lt'; $query->andWhere( $query->expr()->orX( $query->expr()->lt( @@ -440,11 +443,12 @@ class Manager implements ICommentsManager { $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE), IQueryBuilder::PARAM_DATE ), - $query->expr()->lt('id', $query->createNamedParameter($lastKnownCommentId)) + $query->expr()->$idComparison('id', $query->createNamedParameter($lastKnownCommentId)) ) ) ); } else { + $idComparison = $includeLastKnown ? 'gte' : 'gt'; $query->andWhere( $query->expr()->orX( $query->expr()->gt( @@ -458,7 +462,7 @@ class Manager implements ICommentsManager { $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE), IQueryBuilder::PARAM_DATE ), - $query->expr()->gt('id', $query->createNamedParameter($lastKnownCommentId)) + $query->expr()->$idComparison('id', $query->createNamedParameter($lastKnownCommentId)) ) ) ); diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 95f0d2ce30..718391f714 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -128,6 +128,7 @@ interface ICommentsManager { * @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 14.0.0 */ @@ -136,7 +137,8 @@ interface ICommentsManager { string $objectId, int $lastKnownCommentId, string $sortDirection = 'asc', - int $limit = 30 + int $limit = 30, + bool $includeLastKnown = false ): array; /** From 326640462b7d04f6bbbc57858e8f978c9c46afcc Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 09:15:38 +0200 Subject: [PATCH 02/10] Add methods to get the number of comments and last comment since a date Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 55 ++++++++++++++++++++++++ lib/public/Comments/ICommentsManager.php | 20 +++++++++ 2 files changed, 75 insertions(+) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index dc449cc4d4..9e31f44833 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -591,6 +591,61 @@ class Manager implements ICommentsManager { return (int)$data[0]; } + /** + * @param string $objectType + * @param string $objectId + * @param int $lastRead + * @param string $verb + * @return int + * @since 21.0.0 + */ + public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int { + $query = $this->dbConn->getQueryBuilder(); + $query->select($query->func()->count('id', 'num_messages')) + ->from('comments') + ->where($query->expr()->eq('object_type', $query->createNamedParameter($objectType))) + ->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId))) + ->andWhere($query->expr()->gt('id', $query->createNamedParameter($lastRead))); + + if ($verb !== '') { + $query->andWhere($query->expr()->eq('verb', $query->createNamedParameter($verb))); + } + + $result = $query->execute(); + $data = $result->fetch(); + $result->closeCursor(); + + return (int) ($data['num_messages'] ?? 0); + } + + /** + * @param string $objectType + * @param string $objectId + * @param \DateTime $beforeDate + * @param string $verb + * @return int + * @since 21.0.0 + */ + public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int { + $query = $this->dbConn->getQueryBuilder(); + $query->select('id') + ->from('comments') + ->where($query->expr()->eq('object_type', $query->createNamedParameter($objectType))) + ->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId))) + ->andWhere($query->expr()->lt('creation_timestamp', $query->createNamedParameter($beforeDate, IQueryBuilder::PARAM_DATE))) + ->orderBy('creation_timestamp', 'desc'); + + if ($verb !== '') { + $query->andWhere($query->expr()->eq('verb', $query->createNamedParameter($verb))); + } + + $result = $query->execute(); + $data = $result->fetch(); + $result->closeCursor(); + + return (int) ($data['id'] ?? 0); + } + /** * Get the number of unread comments for all files in a folder * diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 718391f714..6e867e2f17 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -166,6 +166,26 @@ interface ICommentsManager { */ public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = ''); + /** + * @param string $objectType + * @param string $objectId + * @param int $lastRead + * @param string $verb + * @return int + * @since 21.0.0 + */ + public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int; + + /** + * @param string $objectType + * @param string $objectId + * @param \DateTime $beforeDate + * @param string $verb + * @return int + * @since 21.0.0 + */ + public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int; + /** * Get the number of unread comments for all files in a folder * From 89651c5233e4e5e71213f7c05c1d94e23937e171 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 09:16:42 +0200 Subject: [PATCH 03/10] Allow to search on multiple objects with one query Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 23 +++++++++++++++++++++-- lib/public/Comments/ICommentsManager.php | 13 +++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 9e31f44833..1077ea554d 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -521,6 +521,25 @@ class Manager implements ICommentsManager { * @return IComment[] */ public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array { + $objectIds = []; + if ($objectId) { + $objectIds[] = $objectIds; + } + return $this->searchForObjects($search, $objectType, $objectIds, $verb, $offset, $limit); + } + + /** + * Search for comments on one or more objects with a given content + * + * @param string $search content to search for + * @param string $objectType Limit the search by object type + * @param array $objectIds Limit the search by object ids + * @param string $verb Limit the verb of the comment + * @param int $offset + * @param int $limit + * @return IComment[] + */ + public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array { $query = $this->dbConn->getQueryBuilder(); $query->select('*') @@ -535,8 +554,8 @@ class Manager implements ICommentsManager { if ($objectType !== '') { $query->andWhere($query->expr()->eq('object_type', $query->createNamedParameter($objectType))); } - if ($objectId !== '') { - $query->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId))); + if (!empty($objectIds)) { + $query->andWhere($query->expr()->in('object_id', $query->createNamedParameter($objectIds, IQueryBuilder::PARAM_STR_ARRAY))); } if ($verb !== '') { $query->andWhere($query->expr()->eq('verb', $query->createNamedParameter($verb))); diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 6e867e2f17..cfdf3d7fdb 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -155,6 +155,19 @@ interface ICommentsManager { */ public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array; + /** + * Search for comments on one or more objects with a given content + * + * @param string $search content to search for + * @param string $objectType Limit the search by object type + * @param array $objectIds Limit the search by object ids + * @param string $verb Limit the verb of the comment + * @param int $offset + * @param int $limit + * @return IComment[] + */ + public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array; + /** * @param $objectType string the object type, e.g. 'files' * @param $objectId string the id of the object From d462439a6311dce60b8a89583af054f2ff120fac Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 09:18:51 +0200 Subject: [PATCH 04/10] Get the last comment date for a list of actors (to allow sorting mention suggestions e.g.) Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 44 ++++++++++++++++++++++++ lib/public/Comments/ICommentsManager.php | 17 +++++++++ 2 files changed, 61 insertions(+) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 1077ea554d..68542580fc 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -31,6 +31,7 @@ namespace OC\Comments; use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Exception\InvalidFieldNameException; use OCA\Comments\AppInfo\Application; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\CommentsEvent; use OCP\Comments\IComment; use OCP\Comments\ICommentsEventHandler; @@ -55,6 +56,9 @@ class Manager implements ICommentsManager { /** @var IConfig */ protected $config; + /** @var ITimeFactory */ + protected $timeFactory; + /** @var IInitialStateService */ protected $initialStateService; @@ -73,10 +77,12 @@ class Manager implements ICommentsManager { public function __construct(IDBConnection $dbConn, LoggerInterface $logger, IConfig $config, + ITimeFactory $timeFactory, IInitialStateService $initialStateService) { $this->dbConn = $dbConn; $this->logger = $logger; $this->config = $config; + $this->timeFactory = $timeFactory; $this->initialStateService = $initialStateService; } @@ -665,6 +671,44 @@ class Manager implements ICommentsManager { return (int) ($data['id'] ?? 0); } + /** + * @param string $objectType + * @param string $objectId + * @param string $verb + * @param string $actorType + * @param string[] $actors + * @return array + * @since 21.0.0 + */ + public function getLastCommentDateByActor( + string $objectType, + string $objectId, + string $verb, + string $actorType, + array $actors + ): array { + $lastComments = []; + + $query = $this->dbConn->getQueryBuilder(); + $query->select('actor_id') + ->selectAlias($query->createFunction('MAX(' . $query->getColumnName('creation_timestamp') . ')'), 'last_comment') + ->from('comments') + ->where($query->expr()->eq('object_type', $query->createNamedParameter($objectType))) + ->andWhere($query->expr()->eq('object_id', $query->createNamedParameter($objectId))) + ->andWhere($query->expr()->eq('verb', $query->createNamedParameter($verb))) + ->andWhere($query->expr()->eq('actor_type', $query->createNamedParameter($actorType))) + ->andWhere($query->expr()->in('actor_id', $query->createNamedParameter($actors, IQueryBuilder::PARAM_STR_ARRAY))) + ->groupBy('actor_id'); + + $result = $query->execute(); + while ($row = $result->fetch()) { + $lastComments[$row['actor_id']] = $this->timeFactory->getDateTime($row['last_comment']); + } + $result->closeCursor(); + + return $lastComments; + } + /** * Get the number of unread comments for all files in a folder * diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index cfdf3d7fdb..60f925afa3 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -199,6 +199,23 @@ interface ICommentsManager { */ public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int; + /** + * @param string $objectType + * @param string $objectId + * @param string $verb + * @param string $actorType + * @param string[] $actors + * @return array + * @since 21.0.0 + */ + public function getLastCommentDateByActor( + string $objectType, + string $objectId, + string $verb, + string $actorType, + array $actors + ): array; + /** * Get the number of unread comments for all files in a folder * From 6400221fbad5246c0bce88dc45895297ff1bb242 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 09:47:40 +0200 Subject: [PATCH 05/10] Less magic Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 68542580fc..4ea1a8076c 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -435,7 +435,11 @@ class Manager implements ICommentsManager { if ($lastKnownComment instanceof IComment) { $lastKnownCommentDateTime = $lastKnownComment->getCreationDateTime(); if ($sortDirection === 'desc') { - $idComparison = $includeLastKnown ? 'lte' : 'lt'; + if ($includeLastKnown) { + $idComparison = $query->expr()->lte('id', $query->createNamedParameter($lastKnownCommentId)); + } else { + $idComparison = $query->expr()->lt('id', $query->createNamedParameter($lastKnownCommentId)); + } $query->andWhere( $query->expr()->orX( $query->expr()->lt( @@ -449,12 +453,16 @@ class Manager implements ICommentsManager { $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE), IQueryBuilder::PARAM_DATE ), - $query->expr()->$idComparison('id', $query->createNamedParameter($lastKnownCommentId)) + $idComparison ) ) ); } else { - $idComparison = $includeLastKnown ? 'gte' : 'gt'; + if ($includeLastKnown) { + $idComparison = $query->expr()->gte('id', $query->createNamedParameter($lastKnownCommentId)); + } else { + $idComparison = $query->expr()->gt('id', $query->createNamedParameter($lastKnownCommentId)); + } $query->andWhere( $query->expr()->orX( $query->expr()->gt( @@ -468,7 +476,7 @@ class Manager implements ICommentsManager { $query->createNamedParameter($lastKnownCommentDateTime, IQueryBuilder::PARAM_DATE), IQueryBuilder::PARAM_DATE ), - $query->expr()->$idComparison('id', $query->createNamedParameter($lastKnownCommentId)) + $idComparison ) ) ); From 4b8fec49e733a9da13f3f5557b611a4059f6021c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 10:05:51 +0200 Subject: [PATCH 06/10] Add return description Signed-off-by: Joas Schilling --- lib/public/Comments/ICommentsManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 60f925afa3..d90179acad 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -205,7 +205,7 @@ interface ICommentsManager { * @param string $verb * @param string $actorType * @param string[] $actors - * @return array + * @return array Map of "string actor" => "\DateTime most recent comment date" * @since 21.0.0 */ public function getLastCommentDateByActor( From 2dd50b4adc7b8b7cef653a6fa2fb28cc0cffc4d8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 11:02:05 +0200 Subject: [PATCH 07/10] Fix return type Signed-off-by: Joas Schilling --- lib/private/Comments/Manager.php | 3 ++- lib/public/Comments/ICommentsManager.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index 4ea1a8076c..1830fb00f3 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -685,7 +685,8 @@ class Manager implements ICommentsManager { * @param string $verb * @param string $actorType * @param string[] $actors - * @return array + * @return \DateTime[] Map of "string actor" => "\DateTime most recent comment date" + * @psalm-return array * @since 21.0.0 */ public function getLastCommentDateByActor( diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index d90179acad..5f381f5964 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -205,7 +205,8 @@ interface ICommentsManager { * @param string $verb * @param string $actorType * @param string[] $actors - * @return array Map of "string actor" => "\DateTime most recent comment date" + * @return \DateTime[] Map of "string actor" => "\DateTime most recent comment date" + * @psalm-return array * @since 21.0.0 */ public function getLastCommentDateByActor( From 8600e51df5fb4f937eefc7fae3dfc33e84654ff2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 22 Oct 2020 10:54:03 +0200 Subject: [PATCH 08/10] Fix manager creation and testing Signed-off-by: Joas Schilling --- lib/private/Comments/ManagerFactory.php | 7 +------ tests/lib/Comments/FakeManager.php | 19 ++++++++++++++++++- tests/lib/Comments/ManagerTest.php | 14 ++++++++++++-- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/lib/private/Comments/ManagerFactory.php b/lib/private/Comments/ManagerFactory.php index 44edf32cf9..a5ac2d6554 100644 --- a/lib/private/Comments/ManagerFactory.php +++ b/lib/private/Comments/ManagerFactory.php @@ -56,11 +56,6 @@ class ManagerFactory implements ICommentsManagerFactory { * @since 9.0.0 */ public function getManager() { - return new Manager( - $this->serverContainer->getDatabaseConnection(), - $this->serverContainer->get(LoggerInterface::class), - $this->serverContainer->getConfig(), - $this->serverContainer->get(IInitialStateService::class) - ); + return $this->serverContainer->get(Manager::class); } } diff --git a/tests/lib/Comments/FakeManager.php b/tests/lib/Comments/FakeManager.php index 91c8d4b7d5..29fb393436 100644 --- a/tests/lib/Comments/FakeManager.php +++ b/tests/lib/Comments/FakeManager.php @@ -30,7 +30,8 @@ class FakeManager implements ICommentsManager { string $objectId, int $lastKnownCommentId, string $sortDirection = 'asc', - int $limit = 30 + int $limit = 30, + bool $includeLastKnown = false ): array { return []; } @@ -86,4 +87,20 @@ class FakeManager implements ICommentsManager { public function load(): void { } + + public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array { + return []; + } + + public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int { + return 0; + } + + public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int { + return 0; + } + + public function getLastCommentDateByActor(string $objectType, string $objectId, string $verb, string $actorType, array $actors): array { + return []; + } } diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index def00fd0dc..a753306257 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -3,13 +3,18 @@ namespace Test\Comments; use OC\Comments\Comment; +use OC\Comments\Manager; use OC\Comments\ManagerFactory; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\IComment; use OCP\Comments\ICommentsEventHandler; use OCP\Comments\ICommentsManager; use OCP\Comments\NotFoundException; +use OCP\IConfig; use OCP\IDBConnection; +use OCP\IInitialStateService; use OCP\IUser; +use Psr\Log\LoggerInterface; use Test\TestCase; /** @@ -63,8 +68,13 @@ class ManagerTest extends TestCase { } protected function getManager() { - $factory = new ManagerFactory(\OC::$server); - return $factory->getManager(); + return new Manager( + $this->connection, + $this->createMock(LoggerInterface::class), + $this->createMock(IConfig::class), + $this->createMock(ITimeFactory::class), + $this->createMock(IInitialStateService::class) + ); } From 1f1244fdcc19b05bf7d2ce4bf570e9c51a506a3d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 22 Oct 2020 11:00:54 +0200 Subject: [PATCH 09/10] Fix PHP CS Signed-off-by: Joas Schilling --- lib/private/Comments/ManagerFactory.php | 2 -- tests/lib/Comments/ManagerTest.php | 1 - 2 files changed, 3 deletions(-) diff --git a/lib/private/Comments/ManagerFactory.php b/lib/private/Comments/ManagerFactory.php index a5ac2d6554..67b006bdb6 100644 --- a/lib/private/Comments/ManagerFactory.php +++ b/lib/private/Comments/ManagerFactory.php @@ -27,9 +27,7 @@ namespace OC\Comments; use OCP\Comments\ICommentsManager; use OCP\Comments\ICommentsManagerFactory; -use OCP\IInitialStateService; use OCP\IServerContainer; -use Psr\Log\LoggerInterface; class ManagerFactory implements ICommentsManagerFactory { diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index a753306257..355b1af134 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -4,7 +4,6 @@ namespace Test\Comments; use OC\Comments\Comment; use OC\Comments\Manager; -use OC\Comments\ManagerFactory; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\IComment; use OCP\Comments\ICommentsEventHandler; From da3d384426d0e00561a23ded4f3dafe56b5f761f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 22 Oct 2020 12:02:48 +0200 Subject: [PATCH 10/10] Fix missing since Signed-off-by: Joas Schilling --- lib/public/Comments/ICommentsManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 5f381f5964..b179b8a746 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -165,6 +165,7 @@ interface ICommentsManager { * @param int $offset * @param int $limit * @return IComment[] + * @since 21.0.0 */ public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array;