Fix: Posts sent to forums had been rejected

This commit is contained in:
Michael 2020-11-04 08:57:21 +00:00
parent 52ea22505d
commit e5704eb05a
2 changed files with 9 additions and 14 deletions

View file

@ -462,14 +462,12 @@ class Transmitter
}
$always_bcc = false;
$isforum = false;
// Check if we should always deliver our stuff via BCC
if (!empty($item['uid'])) {
$profile = User::getOwnerDataById($item['uid']);
if (!empty($profile)) {
$always_bcc = $profile['hide-friends'];
$isforum = $profile['account-type'] == User::ACCOUNT_TYPE_COMMUNITY;
}
}
@ -477,7 +475,7 @@ class Transmitter
$always_bcc = true;
}
if ((self::isAnnounce($item) && !$isforum) || DI::config()->get('debug', 'total_ap_delivery')) {
if (self::isAnnounce($item) || DI::config()->get('debug', 'total_ap_delivery')) {
// Will be activated in a later step
$networks = Protocol::FEDERATED;
} else {
@ -531,10 +529,6 @@ class Transmitter
continue;
}
if ($isforum && DBA::isResult($contact) && ($contact['dfrn'] == Protocol::DFRN)) {
continue;
}
if (!empty($profile = APContact::getByURL($contact['url'], false))) {
$data['to'][] = $profile['url'];
}
@ -547,10 +541,6 @@ class Transmitter
continue;
}
if ($isforum && DBA::isResult($contact) && ($contact['dfrn'] == Protocol::DFRN)) {
continue;
}
if (!empty($profile = APContact::getByURL($contact['url'], false))) {
if ($contact['hidden'] || $always_bcc) {
$data['bcc'][] = $profile['url'];