]> git.mxchange.org Git - friendica.git/commitdiff
$id in Transmitter::sendContactAccept() is a string, see Introduction class
authorRoland Häder <roland@mxchange.org>
Thu, 23 Jun 2022 14:46:44 +0000 (16:46 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Jun 2022 14:48:00 +0000 (16:48 +0200)
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Transmitter.php

index 0b58427c34d9f8ac18b59ffd536b5fd439a4e3c1..d9dd7ee5b321993c99ad2249bb31375f1a8d04f2 100644 (file)
@@ -1267,8 +1267,10 @@ class Processor
                        Contact::update(['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
                }
 
-               $item = ['author-id' => Contact::getIdForURL($activity['actor']),
-                       'author-link' => $activity['actor']];
+               $item = [
+                       'author-id' => Contact::getIdForURL($activity['actor']),
+                       'author-link' => $activity['actor'],
+               ];
 
                // Ensure that the contact has got the right network type
                self::switchContact($item['author-id']);
index 6384e2ed44039a1542696d4ffb4d32c30a461e43..d467f9a548e30cddbadc7371e3939066eff341e1 100644 (file)
@@ -2116,13 +2116,13 @@ class Transmitter
         * Transmit a message that the contact request had been accepted
         *
         * @param string  $target Target profile
-        * @param integer $id Object id
+        * @param string  $id Object id
         * @param integer $uid    User ID
         * @return void
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function sendContactAccept(string $target, int $id, int $uid)
+       public static function sendContactAccept(string $target, string $id, int $uid)
        {
                $profile = APContact::getByURL($target);
                if (empty($profile['inbox'])) {
@@ -2137,7 +2137,7 @@ class Transmitter
                        'type' => 'Accept',
                        'actor' => $owner['url'],
                        'object' => [
-                               'id' => (string)$id,
+                               'id' => $id,
                                'type' => 'Follow',
                                'actor' => $profile['url'],
                                'object' => $owner['url']