]> git.mxchange.org Git - friendica.git/commitdiff
Comments on PeerTube videos not working
authorMichael <heluecht@pirati.ca>
Sat, 21 Nov 2020 08:28:33 +0000 (08:28 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 21 Nov 2020 08:28:33 +0000 (08:28 +0000)
Fixes #9407

src/Protocol/ActivityPub/Transmitter.php

index 531a23a69bb8ea71c5ce3052dcb3619f6f505731..4c2977ec7f849915053f32eb8775966418e4a653 100644 (file)
@@ -432,7 +432,12 @@ class Transmitter
                $activity = json_decode($conversation['source'], true);
 
                $actor = JsonLD::fetchElement($activity, 'actor', 'id');
-               $profile = APContact::getByURL($actor);
+               if (!empty($actor)) {
+                       $permissions['to'][] = $actor;
+                       $profile = APContact::getByURL($actor);
+               } else {
+                       $profile = [];
+               }
 
                $item_profile = APContact::getByURL($item['author-link']);
                $exclude[] = $item['author-link'];
@@ -441,8 +446,6 @@ class Transmitter
                        $exclude[] = $item['owner-link'];
                }
 
-               $permissions['to'][] = $actor;
-
                foreach (['to', 'cc', 'bto', 'bcc'] as $element) {
                        if (empty($activity[$element])) {
                                continue;