mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:50:11 +00:00
Improve local forum distribution
This commit is contained in:
parent
a5a1c81790
commit
d404f15312
2 changed files with 69 additions and 14 deletions
|
@ -600,23 +600,32 @@ class Transmitter
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!empty($profile = APContact::getByURL($contact['url'], false))) {
|
||||
$profile = APContact::getByURL($term['url'], false);
|
||||
if (!empty($profile)) {
|
||||
if ($term['type'] == Tag::EXCLUSIVE_MENTION) {
|
||||
$exclusive = true;
|
||||
if (!empty($profile['followers']) && ($profile['type'] == 'Group')) {
|
||||
$data['cc'][] = $profile['followers'];
|
||||
}
|
||||
}
|
||||
$data['to'][] = $profile['url'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($receiver_list as $receiver) {
|
||||
$contact = DBA::selectFirst('contact', ['url', 'hidden', 'network', 'protocol', 'gsid'], ['id' => $receiver, 'network' => Protocol::FEDERATED]);
|
||||
if (!DBA::isResult($contact) || !self::isAPContact($contact, $networks)) {
|
||||
continue;
|
||||
}
|
||||
if (!$exclusive) {
|
||||
foreach ($receiver_list as $receiver) {
|
||||
$contact = DBA::selectFirst('contact', ['url', 'hidden', 'network', 'protocol', 'gsid'], ['id' => $receiver, 'network' => Protocol::FEDERATED]);
|
||||
if (!DBA::isResult($contact) || !self::isAPContact($contact, $networks)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!empty($profile = APContact::getByURL($contact['url'], false))) {
|
||||
if ($contact['hidden'] || $always_bcc) {
|
||||
$data['bcc'][] = $profile['url'];
|
||||
} else {
|
||||
$data['cc'][] = $profile['url'];
|
||||
if (!empty($profile = APContact::getByURL($contact['url'], false))) {
|
||||
if ($contact['hidden'] || $always_bcc) {
|
||||
$data['bcc'][] = $profile['url'];
|
||||
} else {
|
||||
$data['cc'][] = $profile['url'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue