From 484b99f7cf3550c56c1ab1b598ab3cd7b286e7da Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 7 Dec 2019 21:42:55 +0000 Subject: [PATCH] Fix: Don't automatically mention a post creator on private posts --- src/Protocol/ActivityPub/Transmitter.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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; -- 2.39.5