mirror of
https://github.com/friendica/friendica
synced 2025-04-28 02:30:16 +00:00
Issue 10651: Improved logging
This commit is contained in:
parent
14050ea67b
commit
d89f004a2a
2 changed files with 7 additions and 3 deletions
|
@ -179,7 +179,7 @@ class Notifier
|
|||
$thr_parent = $parent;
|
||||
}
|
||||
|
||||
Logger::log('GUID: ' . $target_item["guid"] . ': Parent is ' . $parent['network'] . '. Thread parent is ' . $thr_parent['network'], Logger::DEBUG);
|
||||
Logger::info('Got post', ['guid' => $target_item['guid'], 'uri-id' => $target_item['uri-id'], 'network' => $target_item['network'], 'parent-network' => $parent['network'], 'thread-parent-network' => $thr_parent['network']]);
|
||||
|
||||
if (!self::isRemovalActivity($cmd, $owner, Protocol::ACTIVITYPUB)) {
|
||||
$apdelivery = self::activityPubDelivery($cmd, $target_item, $parent, $thr_parent, $a->getQueueValue('priority'), $a->getQueueValue('created'), $owner);
|
||||
|
@ -732,21 +732,25 @@ class Notifier
|
|||
{
|
||||
// Don't deliver via AP when the starting post isn't from a federated network
|
||||
if (!in_array($parent['network'], Protocol::FEDERATED)) {
|
||||
Logger::info('Parent network is no federated network, so no AP delivery', ['network' => $parent['network']]);
|
||||
return ['count' => 0, 'contacts' => []];
|
||||
}
|
||||
|
||||
// Don't deliver via AP when the starting post is delivered via Diaspora
|
||||
if ($parent['network'] == Protocol::DIASPORA) {
|
||||
Logger::info('Parent network is Diaspora, so no AP delivery');
|
||||
return ['count' => 0, 'contacts' => []];
|
||||
}
|
||||
|
||||
// Also don't deliver when the direct thread parent was delivered via Diaspora
|
||||
if ($thr_parent['network'] == Protocol::DIASPORA) {
|
||||
Logger::info('Threat parent network is Diaspora, so no AP delivery');
|
||||
return ['count' => 0, 'contacts' => []];
|
||||
}
|
||||
|
||||
// Posts from Diaspora contacts are transmitted via Diaspora
|
||||
if ($target_item['network'] == Protocol::DIASPORA) {
|
||||
Logger::info('Post network is Diaspora, so no AP delivery');
|
||||
return ['count' => 0, 'contacts' => []];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue