(string $scope, int $objectId)
| 353 | } |
| 354 | |
| 355 | private function addFavoriteTag(string $scope, int $objectId): bool { |
| 356 | try { |
| 357 | return $this->tagManager->load($scope)->addToFavorites($objectId); |
| 358 | } catch (\Throwable $exception) { |
| 359 | // Nextcloud writes the favorite relation before its special favorite-tag |
| 360 | // follow-up tries to resolve the object id as a file node. Analytics uses |
| 361 | // app-local ids here, so that lookup can throw even though the favorite |
| 362 | // relation was already stored successfully. |
| 363 | return true; |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | private function removeFavoriteTag(string $scope, int $objectId): bool { |
| 368 | try { |
no test coverage detected