mirror of
https://github.com/friendica/friendica
synced 2025-04-23 18:30:11 +00:00
AP: Automatically send follow requests for reshared items
This commit is contained in:
parent
fc0acd7b1f
commit
a7963fe18a
3 changed files with 25 additions and 1 deletions
|
@ -329,6 +329,15 @@ class Processor
|
|||
$item_id = Item::insert($item);
|
||||
Logger::log('Storing for user ' . $item['uid'] . ': ' . $item_id);
|
||||
}
|
||||
|
||||
if (!$item['private'] && ($item['gravity'] == GRAVITY_PARENT) && ($item['author-link'] != $item['owner-link'])) {
|
||||
$author = APContact::getByURL($item['owner-link'], false);
|
||||
// We send automatic follow requests for reshared messages. (We don't need though for forum posts)
|
||||
if ($author['type'] != 'Group') {
|
||||
Logger::log('Send follow request for ' . $item['uri'] . ' to ' . $item['author-link'], Logger::DEBUG);
|
||||
ActivityPub\Transmitter::sendFollowObject($item['uri'], $item['author-link']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue