]> git.mxchange.org Git - friendica.git/commitdiff
The original content of the post hadn't always been stored
authorMichael <heluecht@pirati.ca>
Tue, 3 Mar 2020 21:58:03 +0000 (21:58 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 3 Mar 2020 21:58:03 +0000 (21:58 +0000)
src/Protocol/ActivityPub.php
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php

index f1cd652f47d74885fcec77d72e55226524b20bc3..fd2f84e51537e563b52e2564777af01e13be73ef 100644 (file)
@@ -209,7 +209,7 @@ class ActivityPub
 
                foreach ($items as $activity) {
                        $ldactivity = JsonLD::compact($activity);
-                       ActivityPub\Receiver::processActivity($ldactivity, '', $uid, true);
+                       ActivityPub\Receiver::processActivity($ldactivity, json_encode($activity), $uid, true);
                }
        }
 
index 14b993e6e2aaeeea0091eaffe9c2364082212fb6..2f4c7845373ce679d3d309e22021d91b3ef69811 100644 (file)
@@ -687,7 +687,7 @@ 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..67404af5e5dbf500397c4e18b54cfeef388fdf5d 100644 (file)
@@ -784,7 +784,11 @@ 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') {