This now should really prevent sending the follow requests only once
This commit is contained in:
parent
04f34de3a1
commit
3b7e9cc3a2
1 changed files with 3 additions and 3 deletions
|
@ -360,8 +360,8 @@ class Processor
|
||||||
$item_id = Item::insert($item);
|
$item_id = Item::insert($item);
|
||||||
Logger::log('Storing for user ' . $item['uid'] . ': ' . $item_id);
|
Logger::log('Storing for user ' . $item['uid'] . ': ' . $item_id);
|
||||||
|
|
||||||
if ($item_id) {
|
if ($item['uid'] == 0) {
|
||||||
$stored = true;
|
$stored = $item_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ class Processor
|
||||||
$author = APContact::getByURL($item['owner-link'], false);
|
$author = APContact::getByURL($item['owner-link'], false);
|
||||||
// We send automatic follow requests for reshared messages. (We don't need though for forum posts)
|
// We send automatic follow requests for reshared messages. (We don't need though for forum posts)
|
||||||
if ($author['type'] != 'Group') {
|
if ($author['type'] != 'Group') {
|
||||||
Logger::log('Send follow request for ' . $item['uri'] . ' to ' . $item['author-link'], Logger::DEBUG);
|
Logger::log('Send follow request for ' . $item['uri'] . ' (' . $stored . ') to ' . $item['author-link'], Logger::DEBUG);
|
||||||
ActivityPub\Transmitter::sendFollowObject($item['uri'], $item['author-link']);
|
ActivityPub\Transmitter::sendFollowObject($item['uri'], $item['author-link']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue