(string $scope, int $objectId)
| 412 | } |
| 413 | |
| 414 | private function addFavoriteTag(string $scope, int $objectId): bool { |
| 415 | try { |
| 416 | return $this->tagManager->load($scope)->addToFavorites($objectId); |
| 417 | } catch (\Throwable $exception) { |
| 418 | // Nextcloud writes the favorite relation before its special favorite-tag |
| 419 | // follow-up tries to resolve the object id as a file node. Analytics uses |
| 420 | // app-local ids here, so that lookup can throw even though the favorite |
| 421 | // relation was already stored successfully. |
| 422 | return true; |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | private function removeFavoriteTag(string $scope, int $objectId): bool { |
| 427 | try { |
no test coverage detected