mirror of
https://github.com/friendica/friendica
synced 2025-04-26 04:30:11 +00:00
Improve forum delivery, avoid false distribution
This commit is contained in:
parent
3fd5c79025
commit
038e505ca3
2 changed files with 23 additions and 7 deletions
|
@ -663,13 +663,14 @@ class Receiver
|
|||
}
|
||||
|
||||
if (!empty($actor)) {
|
||||
$profile = APContact::getByURL($actor);
|
||||
$profile = APContact::getByURL($actor);
|
||||
$followers = $profile['followers'] ?? '';
|
||||
|
||||
Logger::log('Actor: ' . $actor . ' - Followers: ' . $followers, Logger::DEBUG);
|
||||
$is_forum = $actor['type'] == 'Group';
|
||||
Logger::info('Got actor and followers', ['actor' => $actor, 'followers' => $followers]);
|
||||
} else {
|
||||
Logger::info('Empty actor', ['activity' => $activity]);
|
||||
$followers = '';
|
||||
$is_forum = false;
|
||||
}
|
||||
|
||||
// We have to prevent false follower assumptions upon thread completions
|
||||
|
@ -692,7 +693,7 @@ class Receiver
|
|||
}
|
||||
|
||||
// Fetch the receivers for the public and the followers collection
|
||||
if (in_array($receiver, [$followers, self::PUBLIC_COLLECTION]) && !empty($actor)) {
|
||||
if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$is_forum)) && !empty($actor)) {
|
||||
$receivers = self::getReceiverForActor($actor, $tags, $receivers, $follower_target);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue