From a36e53af3c22a02e57d7ce58e22006e6dbd1391d Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 13 Apr 2023 05:05:20 +0000 Subject: [PATCH] Fix: Attached images from Lemmy can now be processed --- src/Protocol/ActivityPub/Receiver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index a52867616..4bba5f5da 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -1638,7 +1638,7 @@ class Receiver 'type' => str_replace('as:', '', JsonLD::fetchElement($attachment, '@type')), 'mediaType' => JsonLD::fetchElement($attachment, 'as:mediaType', '@value'), 'name' => JsonLD::fetchElement($attachment, 'as:name', '@value'), - 'url' => JsonLD::fetchElement($attachment, 'as:url', '@id'), + 'url' => JsonLD::fetchElement($attachment, 'as:url', '@id') ?? JsonLD::fetchElement($attachment, 'as:href', '@id'), 'height' => JsonLD::fetchElement($attachment, 'as:height', '@value'), 'width' => JsonLD::fetchElement($attachment, 'as:width', '@value'), 'image' => JsonLD::fetchElement($attachment, 'as:image', '@id')