From: Michael Date: Tue, 3 Mar 2020 08:04:14 +0000 (+0000) Subject: Store the direction only when there is content to store X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e3d3dc50e506f276f6adfa9a20b17140a9d98877;p=friendica.git Store the direction only when there is content to store --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index e79fcaff68..14b993e6e2 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -461,6 +461,10 @@ class Processor $item['protocol'] = Conversation::PARCEL_ACTIVITYPUB; $item['conversation-href'] = $activity['context'] ?? ''; $item['conversation-uri'] = $activity['conversation'] ?? ''; + + if (isset($activity['push'])) { + $item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL; + } } $isForum = false; @@ -489,10 +493,6 @@ class Processor return; } - if (isset($activity['push'])) { - $item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL; - } - $item['plink'] = $activity['alternate-url'] ?? $item['uri']; $item = self::constructAttachList($activity, $item);