]> git.mxchange.org Git - friendica.git/commitdiff
Issue 12977: Ensure to fetch quoted posts
authorMichael <heluecht@pirati.ca>
Sat, 8 Apr 2023 06:08:45 +0000 (06:08 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 8 Apr 2023 06:08:45 +0000 (06:08 +0000)
src/Protocol/ActivityPub/Receiver.php

index 468af6c72fe1ff4b5385265b622c8da473d0ac7e..a5286761639fcdb91df0ca546a42f10f358f9198 100644 (file)
@@ -630,7 +630,7 @@ class Receiver
                        $object_data['object_activity'] = $activity;
                }
 
-               if (($type == 'as:Create') && $trust_source) {
+               if (($type == 'as:Create') && $trust_source && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE])) {
                        if (self::hasArrived($object_data['object_id'])) {
                                Logger::info('The activity already arrived.', ['id' => $object_data['object_id']]);
                                return true;
@@ -641,6 +641,8 @@ class Receiver
                                Logger::info('The activity is already added.', ['id' => $object_data['object_id']]);
                                return true;
                        }
+               } elseif (($type == 'as:Create') && $trust_source && !self::hasArrived($object_data['object_id'])) {
+                       self::addArrivedId($object_data['object_id']);
                }
 
                $decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE]);