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