]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Don't automatically mention a post creator on private posts
authorMichael <heluecht@pirati.ca>
Sat, 7 Dec 2019 21:42:55 +0000 (21:42 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 7 Dec 2019 21:42:55 +0000 (21:42 +0000)
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;