From: Hypolite Petovan Date: Sun, 19 May 2019 22:44:57 +0000 (-0400) Subject: Ensure follow reject/accept object IDs are strings to avoid JsonLD normalize errors... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=10dfe4347b491b2b41c6c5b62f0c6ad8a2391ecc;p=friendica.git Ensure follow reject/accept object IDs are strings to avoid JsonLD normalize errors in ActivityPub\Transmitter --- diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 7fc5e2df06..ed792db16e 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -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);