From: Michael Date: Sat, 7 Dec 2019 21:42:55 +0000 (+0000) Subject: Fix: Don't automatically mention a post creator on private posts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=484b99f7cf3550c56c1ab1b598ab3cd7b286e7da;p=friendica.git Fix: Don't automatically mention a post creator on private posts --- diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 5bb03a8517..aebf598912 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -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;