From 0da7c3fdb23fbfa04fea438062b782f87a93f3f4 Mon Sep 17 00:00:00 2001 From: BentiGorlich Date: Tue, 14 Jan 2025 14:47:42 +0100 Subject: [PATCH] Fix search for URLs - 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 --- src/Controller/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/SearchController.php b/src/Controller/SearchController.php index 99955aff7..865e09cce 100644 --- a/src/Controller/SearchController.php +++ b/src/Controller/SearchController.php @@ -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);