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