mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
Merge pull request #14168 from annando/issue-14153
Issue 14153: Don't transmit activities to all participants
This commit is contained in:
commit
4b3498710f
1 changed files with 9 additions and 1 deletions
|
@ -765,7 +765,7 @@ class Transmitter
|
|||
}
|
||||
|
||||
if (!empty($item['parent']) && (!$exclusive || ($item['private'] == Item::PRIVATE))) {
|
||||
if ($item['private'] == Item::PRIVATE) {
|
||||
if ($item['private'] == Item::PRIVATE || $item['gravity'] == Item::GRAVITY_ACTIVITY) {
|
||||
$condition = ['parent' => $item['parent'], 'uri-id' => $item['thr-parent-id']];
|
||||
} else {
|
||||
$condition = ['parent' => $item['parent']];
|
||||
|
@ -814,6 +814,14 @@ class Transmitter
|
|||
DBA::close($parents);
|
||||
}
|
||||
|
||||
if (!empty($item['quote-uri-id']) && in_array($item['private'], [Item::PUBLIC, Item::UNLISTED])) {
|
||||
$quoted = Post::selectFirst(['author-link'], ['uri-id' => $item['quote-uri-id']]);
|
||||
$profile = APContact::getByURL($quoted['author-link'], false);
|
||||
if (!empty($profile)) {
|
||||
$data['cc'][] = $profile['url'];
|
||||
}
|
||||
}
|
||||
|
||||
$data['to'] = array_unique($data['to']);
|
||||
$data['cc'] = array_unique($data['cc']);
|
||||
$data['bcc'] = array_unique($data['bcc']);
|
||||
|
|
Loading…
Reference in a new issue