mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
Added the option to only receive top level posts from people you follow
This commit is contained in:
parent
a80a6bec74
commit
e247a14d2b
6 changed files with 89 additions and 5 deletions
|
@ -425,6 +425,21 @@ class Processor
|
|||
continue;
|
||||
}
|
||||
|
||||
if (PConfig::get($receiver, 'system', 'accept_only_sharer', false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
|
||||
$skip = !Contact::isSharingByURL($activity['author'], $receiver);
|
||||
|
||||
if ($skip && (($activity['type'] == 'as:Announce') || $isForum)) {
|
||||
$skip = !Contact::isSharingByURL($activity['actor'], $receiver);
|
||||
}
|
||||
|
||||
if ($skip) {
|
||||
Logger::info('Skipping post', ['uid' => $receiver, 'url' => $item['uri']]);
|
||||
continue;
|
||||
}
|
||||
|
||||
Logger::info('Accepting post', ['uid' => $receiver, 'url' => $item['uri']]);
|
||||
}
|
||||
|
||||
if ($activity['object_type'] == 'as:Event') {
|
||||
self::createEvent($activity, $item);
|
||||
}
|
||||
|
@ -524,10 +539,6 @@ class Processor
|
|||
*/
|
||||
public static function fetchMissingActivity($url, $child = [])
|
||||
{
|
||||
if (Config::get('system', 'ostatus_full_threads')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!empty($child['receiver'])) {
|
||||
$uid = ActivityPub\Receiver::getFirstUserFromReceivers($child['receiver']);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue