]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Attached images from Lemmy can now be processed
authorMichael <heluecht@pirati.ca>
Thu, 13 Apr 2023 05:05:20 +0000 (05:05 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 13 Apr 2023 05:05:20 +0000 (05:05 +0000)
src/Protocol/ActivityPub/Receiver.php

index a5286761639fcdb91df0ca546a42f10f358f9198..4bba5f5da8914a73fe3dfbf3a492907753b4042e 100644 (file)
@@ -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')