From 9175521d8fdf22e52d39b43d6bc50ed1a6026b49 Mon Sep 17 00:00:00 2001 From: stefanorosanelli Date: Tue, 12 Mar 2024 11:37:51 +0100 Subject: [PATCH] chore: add URL in links metadata --- src/Index/CollectionHandler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Index/CollectionHandler.php b/src/Index/CollectionHandler.php index 02e1da0..4bf037e 100644 --- a/src/Index/CollectionHandler.php +++ b/src/Index/CollectionHandler.php @@ -172,6 +172,7 @@ protected function addDocument(ObjectEntity $collection, ObjectEntity $entity): if ($entity->get('type') === 'links') { $body['link'] = (string)$entity->get('url'); $body['options'] = Hash::get($extra, 'brevia.options'); + $body['metadata']['url'] = $body['link']; $this->client->post('/index/link', array_filter($body)); } else { $body['content'] = sprintf("%s\n%s", (string)$entity->get('title'), strip_tags((string)$entity->get('body')));