(string $scope, int $objectId)
| 307 | } |
| 308 | |
| 309 | private function addFavoriteTag(string $scope, int $objectId): bool { |
| 310 | try { |
| 311 | return $this->tagManager->load($scope)->addToFavorites($objectId); |
| 312 | } catch (\Throwable $exception) { |
| 313 | // Nextcloud writes the favorite relation before its special favorite-tag |
| 314 | // follow-up tries to resolve the object id as a file node. Analytics uses |
| 315 | // app-local ids here, so that lookup can throw even though the favorite |
| 316 | // relation was already stored successfully. |
| 317 | return true; |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | private function removeFavoriteTag(string $scope, int $objectId): bool { |
| 322 | try { |
no test coverage detected