]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Receiver.php
Merge pull request #13724 from Raroun/Fix-for-Issue-#13637---Photo-caption-prevents...
[friendica.git] / src / Protocol / ActivityPub / Receiver.php
index 1a4c759b9423fa2b18403557d156eaf5a7b8a831..ff78f0db82dbe0b574c5e33115a1f80dacff5256 100644 (file)
@@ -498,19 +498,6 @@ class Receiver
                $object_data['receiver'] = array_replace($object_data['receiver'] ?? [], $receivers);
                $object_data['reception_type'] = array_replace($object_data['reception_type'] ?? [], $reception_types);
 
-               //              This check here interferes with Hubzilla posts where the author host differs from the host the post was created
-               //              $author = $object_data['author'] ?? $actor;
-               //              if (!empty($author) && !empty($object_data['id'])) {
-               //                      $author_host = parse_url($author, PHP_URL_HOST);
-               //                      $id_host = parse_url($object_data['id'], PHP_URL_HOST);
-               //                      if ($author_host == $id_host) {
-               //                              Logger::info('Valid hosts', ['type' => $type, 'host' => $id_host]);
-               //                      } else {
-               //                              Logger::notice('Differing hosts on author and id', ['type' => $type, 'author' => $author_host, 'id' => $id_host]);
-               //                              $trust_source = false;
-               //                      }
-               //              }
-
                $account = Contact::selectFirstAccount(['platform'], ['nurl' => Strings::normaliseLink($actor)]);
                $platform = $account['platform'] ?? '';
 
@@ -1226,7 +1213,7 @@ class Receiver
                                }
 
                                // Fetch the receivers for the public and the followers collection
-                               if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$isGroup) || ($isGroup && ($element == 'as:audience'))) && !empty($actor)) {
+                               if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$isGroup) || ($isGroup && ($element == 'as:audience'))) && !empty($profile)) {
                                        $receivers = self::getReceiverForActor($tags, $receivers, $follower_target, $profile);
                                        continue;
                                }