Merge pull request #14367 from annando/issue-14364-a

Issue 14364: Fix delivery of group posts to Friendica contacts
This commit is contained in:
Tobias Diekershoff 2024-08-17 05:50:31 +02:00 committed by GitHub
commit f37afcff3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 15 deletions

View file

@ -547,9 +547,9 @@ class Item
$item['private'] = $private_group ? ItemModel::PRIVATE : ItemModel::UNLISTED; $item['private'] = $private_group ? ItemModel::PRIVATE : ItemModel::UNLISTED;
if ($only_to_group) { if ($only_to_group) {
$ucid = Contact::getUserContactId($group_contact['id'], $item['uid']); $pcid = Contact::getPublicContactId($group_contact['id'], $item['uid']);
if ($ucid) { if ($pcid) {
$item['owner-id'] = $ucid; $item['owner-id'] = $pcid;
unset($item['owner-link']); unset($item['owner-link']);
unset($item['owner-name']); unset($item['owner-name']);
unset($item['owner-avatar']); unset($item['owner-avatar']);

View file

@ -1028,14 +1028,6 @@ class Transmitter
{ {
$inboxes = []; $inboxes = [];
$isGroup = false;
if (!empty($uid)) {
$profile = User::getOwnerDataById($uid);
if (!empty($profile)) {
$isGroup = $profile['account-type'] == User::ACCOUNT_TYPE_COMMUNITY;
}
}
if ($all_ap) { if ($all_ap) {
// Will be activated in a later step // Will be activated in a later step
$networks = Protocol::FEDERATED; $networks = Protocol::FEDERATED;
@ -1064,10 +1056,6 @@ class Transmitter
continue; continue;
} }
if ($isGroup && ($contact['network'] == Protocol::DFRN)) {
continue;
}
if (Network::isUrlBlocked($contact['url'])) { if (Network::isUrlBlocked($contact['url'])) {
continue; continue;
} }