]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Receiver.php
Merge branch 'stable' into develop
[friendica.git] / src / Protocol / ActivityPub / Receiver.php
index 8e1f3853a579f8660814f40a75884e68600f98cb..7c753f18860f43a94e2b92186dfbdab8d2a213c8 100644 (file)
@@ -665,7 +665,7 @@ class Receiver
                if (!empty($actor)) {
                        $profile   = APContact::getByURL($actor);
                        $followers = $profile['followers'] ?? '';
-                       $is_forum  = $actor['type'] == 'Group';
+                       $is_forum  = ($actor['type'] ?? '') == 'Group';
                        Logger::info('Got actor and followers', ['actor' => $actor, 'followers' => $followers]);
                } else {
                        Logger::info('Empty actor', ['activity' => $activity]);
@@ -1112,14 +1112,6 @@ class Receiver
                                                'image' => $pageImage,
                                        ];
                                        break;
-                               case 'as:Link':
-                                       $attachlist[] = [
-                                               '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:href', '@id')
-                                       ];
-                                       break;
                                case 'as:Image':
                                        $mediaType = JsonLD::fetchElement($attachment, 'as:mediaType', '@value');
                                        $imageFullUrl = JsonLD::fetchElement($attachment, 'as:url', '@id');
@@ -1181,7 +1173,10 @@ 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'),
+                                               'height' => JsonLD::fetchElement($attachment, 'as:height', '@value'),
+                                               'width' => JsonLD::fetchElement($attachment, 'as:width', '@value'),
+                                               'image' => JsonLD::fetchElement($attachment, 'as:image', '@id')
                                        ];
                        }
                }