]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #7915 from annando/issue-7914
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 7 Dec 2019 21:53:50 +0000 (16:53 -0500)
committerGitHub <noreply@github.com>
Sat, 7 Dec 2019 21:53:50 +0000 (16:53 -0500)
Fixes issue 7914: Reshares got crumbled

src/Protocol/ActivityPub/Transmitter.php

index 5bb03a8517138f752194171a9aecf487cbd3adf2..aebf59891271cdc30cce93bbd50b35f63b0ed669 100644 (file)
@@ -381,16 +381,16 @@ class Transmitter
 
                $terms = Term::tagArrayFromItemId($item['id'], [Term::MENTION, Term::IMPLICIT_MENTION]);
 
-               // Directly mention the original author upon a quoted reshare.
-               // Else just ensure that the original author receives the reshare.
-               $announce = self::getAnnounceArray($item);
-               if (!empty($announce['comment'])) {
-                       $data['to'][] = $announce['actor']['url'];
-               } elseif (!empty($announce)) {
-                       $data['cc'][] = $announce['actor']['url'];
-               }
-
                if (!$item['private']) {
+                       // Directly mention the original author upon a quoted reshare.
+                       // Else just ensure that the original author receives the reshare.
+                       $announce = self::getAnnounceArray($item);
+                       if (!empty($announce['comment'])) {
+                               $data['to'][] = $announce['actor']['url'];
+                       } elseif (!empty($announce)) {
+                               $data['cc'][] = $announce['actor']['url'];
+                       }
+
                        $data = array_merge($data, self::fetchPermissionBlockFromConversation($item));
 
                        $data['to'][] = ActivityPub::PUBLIC_COLLECTION;