Skip to content

Commit

Permalink
Fix search for URLs
Browse files Browse the repository at this point in the history
- when improving the search the `decoded` option for `getActivityObject` was set to false which leads to a plain json string response. That leads to errors when attempting to read properties, so fix that
  • Loading branch information
BentiGorlich committed Jan 14, 2025
1 parent 5a25fde commit 0da7c3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __invoke(Request $request): Response
$this->logger->debug('Query is a valid url');
$objects = $this->manager->findByApId($query);
if (0 === \sizeof($objects)) {
$body = $this->apHttpClient->getActivityObject($query, false);
$body = $this->apHttpClient->getActivityObject($query);
// the returned id could be different from the query url.
$postId = $body['id'];
$objects = $this->manager->findByApId($postId);
Expand Down

0 comments on commit 0da7c3f

Please sign in to comment.