X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDiaspora.php;h=9e80c130282428401353223353ec1cac6fd4c6d9;hb=934a3a6721ee40b8d658dc8a38a530642283bf47;hp=c12912f6813f51e0603e32caa98a33eef88d4613;hpb=4e3102bfb3ad9f4f56b1b1b906cb59c75cdf1659;p=friendica.git diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index c12912f681..9e80c13028 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -475,7 +475,7 @@ class Diaspora } if (!($fields = self::validPosting($msg))) { - Logger::notice('Invalid posting'); + Logger::warning('Invalid posting'); return false; } @@ -510,7 +510,7 @@ class Diaspora if (is_null($fields)) { $private = true; if (!($fields = self::validPosting($msg))) { - Logger::notice('Invalid posting'); + Logger::warning('Invalid posting'); return false; } } else { @@ -734,7 +734,7 @@ class Diaspora } if (!Crypto::rsaVerify($signed_data, $parent_author_signature, $key, 'sha256')) { - Logger::info('No valid parent author signature for parent author ' . $msg['author'] . ' in type ' . $type . ' - signed data: ' . $signed_data . ' - Message: ' . $msg['message'] . ' - Signature ' . $parent_author_signature); + Logger::info('No valid parent author signature', ['author' => $msg['author'], 'type' => $type, 'signed data' => $signed_data, 'message' => $msg['message'], 'signature' => $parent_author_signature]); return false; } } @@ -746,7 +746,7 @@ class Diaspora } if (!Crypto::rsaVerify($signed_data, $author_signature, $key, 'sha256')) { - Logger::info('No valid author signature for author ' . $fields->author . ' in type ' . $type . ' - signed data: ' . $signed_data . ' - Message: ' . $msg['message'] . ' - Signature ' . $author_signature); + Logger::info('No valid author signature for author', ['author' => $fields->author, 'type' => $type, 'signed data' => $signed_data, 'message' => $msg['message'], 'signature' => $author_signature]); return false; } else { return $fields; @@ -1711,7 +1711,7 @@ class Diaspora } } if (!$conversation) { - Logger::notice('Unable to create conversation.'); + Logger::warning('Unable to create conversation.'); return false; } @@ -2001,11 +2001,11 @@ class Diaspora Logger::info('Participation stored', ['id' => $message_id, 'guid' => $guid, 'parent_guid' => $parent_guid, 'author' => $author]); // Send all existing comments and likes to the requesting server - $comments = Post::select(['id', 'uri-id', 'parent-author-network', 'author-network', 'verb'], + $comments = Post::select(['id', 'uri-id', 'parent-author-network', 'author-network', 'verb', 'gravity'], ['parent' => $toplevel_parent_item['id'], 'gravity' => [GRAVITY_COMMENT, GRAVITY_ACTIVITY]]); while ($comment = Post::fetch($comments)) { - if (in_array($comment['verb'], [Activity::FOLLOW, Activity::TAG])) { - Logger::info('participation messages are not relayed', ['item' => $comment['id']]); + if (($comment['gravity'] == GRAVITY_ACTIVITY) && !in_array($comment['verb'], [Activity::LIKE, Activity::DISLIKE])) { + Logger::info('Unsupported activities are not relayed', ['item' => $comment['id'], 'verb' => $comment['verb']]); continue; } @@ -2020,7 +2020,7 @@ class Diaspora } Logger::info('Deliver participation', ['item' => $comment['id'], 'contact' => $author_contact['cid']]); - if (Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['id'], $author_contact['cid'])) { + if (Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['uri-id'], $author_contact['cid'], $datarray['uid'])) { Post\DeliveryData::incrementQueueCount($comment['uri-id'], 1); } } @@ -3644,7 +3644,7 @@ class Diaspora $attend_answer = 'tentative'; break; default: - Logger::notice('Unknown verb ' . $item['verb'] . ' in item ' . $item['guid']); + Logger::warning('Unknown verb ' . $item['verb'] . ' in item ' . $item['guid']); return false; }