(string $scope, int $objectId)
| 436 | } |
| 437 | |
| 438 | private function addFavoriteTag(string $scope, int $objectId): bool { |
| 439 | try { |
| 440 | return $this->tagManager->load($scope)->addToFavorites($objectId); |
| 441 | } catch (\Throwable $exception) { |
| 442 | // Nextcloud writes the favorite relation before its special favorite-tag |
| 443 | // follow-up tries to resolve the object id as a file node. Analytics uses |
| 444 | // app-local ids here, so that lookup can throw even though the favorite |
| 445 | // relation was already stored successfully. |
| 446 | return true; |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | private function removeFavoriteTag(string $scope, int $objectId): bool { |
| 451 | try { |
no test coverage detected