add test for activity depth filter

This commit is contained in:
Salipa-Gurung
2024-08-26 09:54:07 +05:45
parent b1e393ab50
commit a9895a9073
4 changed files with 313 additions and 2 deletions
+8 -2
View File
@@ -2326,6 +2326,7 @@ class GraphHelper {
* @param string $user
* @param string $password
* @param string $resourceId
* @param string $depth
*
* @return ResponseInterface
*/
@@ -2334,11 +2335,16 @@ class GraphHelper {
string $requestId,
string $user,
string $password,
string $resourceId
string $resourceId,
?string $depth = null
): ResponseInterface {
// 'kql=itemId' filter is required for the current implementation but it might change in future
// See: https://github.com/owncloud/ocis/issues/9194
$fullUrl = self::getBetaFullUrl($baseUrl, "extensions/org.libregraph/activities?kql=itemid%3A$resourceId");
if ($depth !== null) {
$fullUrl = self::getBetaFullUrl($baseUrl, "extensions/org.libregraph/activities?kql=itemid%3A$resourceId+AND+depth%3A$depth");
} else {
$fullUrl = self::getBetaFullUrl($baseUrl, "extensions/org.libregraph/activities?kql=itemid%3A$resourceId");
}
return HttpRequestHelper::get(
$fullUrl,
$requestId,