]> git.mxchange.org Git - friendica.git/commitdiff
The direction field needs to be removed
authorMichael <heluecht@pirati.ca>
Tue, 3 Mar 2020 22:43:19 +0000 (22:43 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 3 Mar 2020 22:43:19 +0000 (22:43 +0000)
src/Model/Conversation.php
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php

index 80103b2dcc5e6a26ecf552e6522a90b4a3d7e28e..1dcb6b0c2d7cc8476d1a0038eb613579d092a487 100644 (file)
@@ -135,6 +135,7 @@ class Conversation
                unset($arr['conversation-href']);
                unset($arr['protocol']);
                unset($arr['source']);
+               unset($arr['direction']);
 
                return $arr;
        }
index 14b993e6e2aaeeea0091eaffe9c2364082212fb6..2fd2f2f77cb79a6a9db13ef0af30b56a6ee4a3f4 100644 (file)
@@ -687,7 +687,8 @@ class Processor
 
                $ldactivity['thread-completion'] = true;
 
-               ActivityPub\Receiver::processActivity($ldactivity);
+               ActivityPub\Receiver::processActivity($ldactivity, json_encode($activity));
+
                Logger::notice('Activity had been fetched and processed.', ['url' => $url, 'object' => $activity['id']]);
 
                return $activity['id'];
index 97eb3b62c69c854c49a974133be0832768b3a154..075bc942edeecf17edc28922b0f4e2875cf01adf 100644 (file)
@@ -784,7 +784,12 @@ class Receiver
                }
 
                if (in_array($type, self::CONTENT_TYPES)) {
-                       return self::processObject($object);
+                       $object_data = self::processObject($object);
+
+                       if (!empty($data)) {
+                               $object_data['raw'] = json_encode($data);
+                       }
+                       return $object_data;
                }
 
                if ($type == 'as:Announce') {