]> git.mxchange.org Git - friendica.git/commitdiff
Ensure follow reject/accept object IDs are strings to avoid JsonLD normalize errors...
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 19 May 2019 22:44:57 +0000 (18:44 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 20 May 2019 19:29:20 +0000 (15:29 -0400)
src/Protocol/ActivityPub/Transmitter.php

index 7fc5e2df0665ced6a9e0a478ba14e49617940ef4..ed792db16e75a85952bf5a1eb4bcc2da80ad2241 100644 (file)
@@ -1538,13 +1538,16 @@ class Transmitter
                        'id' => System::baseUrl() . '/activity/' . System::createGUID(),
                        'type' => 'Accept',
                        'actor' => $owner['url'],
-                       'object' => ['id' => $id, 'type' => 'Follow',
+                       'object' => [
+                               'id' => (string)$id,
+                               'type' => 'Follow',
                                'actor' => $profile['url'],
-                               'object' => $owner['url']],
+                               'object' => $owner['url']
+                       ],
                        'instrument' => self::getService(),
                        'to' => [$profile['url']]];
 
-               Logger::log('Sending accept to ' . $target . ' for user ' . $uid . ' with id ' . $id, Logger::DEBUG);
+               Logger::debug('Sending accept to ' . $target . ' for user ' . $uid . ' with id ' . $id);
 
                $signed = LDSignature::sign($data, $owner);
                HTTPSignature::transmit($signed, $profile['inbox'], $uid);
@@ -1568,13 +1571,16 @@ class Transmitter
                        'id' => System::baseUrl() . '/activity/' . System::createGUID(),
                        'type' => 'Reject',
                        'actor' => $owner['url'],
-                       'object' => ['id' => $id, 'type' => 'Follow',
+                       'object' => [
+                               'id' => (string)$id,
+                               'type' => 'Follow',
                                'actor' => $profile['url'],
-                               'object' => $owner['url']],
+                               'object' => $owner['url']
+                       ],
                        'instrument' => self::getService(),
                        'to' => [$profile['url']]];
 
-               Logger::log('Sending reject to ' . $target . ' for user ' . $uid . ' with id ' . $id, Logger::DEBUG);
+               Logger::debug('Sending reject to ' . $target . ' for user ' . $uid . ' with id ' . $id);
 
                $signed = LDSignature::sign($data, $owner);
                HTTPSignature::transmit($signed, $profile['inbox'], $uid);