Explorar o código

Update AP inbox

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
f680cb1fad
Modificáronse 1 ficheiros con 3 adicións e 7 borrados
  1. 3 7
      app/Util/ActivityPub/Inbox.php

+ 3 - 7
app/Util/ActivityPub/Inbox.php

@@ -197,19 +197,15 @@ class Inbox
                     'item_type' => 'App\Profile'
                 ]);
             }
-
+            $payload = $this->payload;
+            $payload = unset($payload['@context']);
             // send Accept to remote profile
             $accept = [
                 '@context' => 'https://www.w3.org/ns/activitystreams',
                 'id'       => $target->permalink().'#accepts/follows/' . $follower->id,
                 'type'     => 'Accept',
                 'actor'    => $target->permalink(),
-                'object'   => [
-                    'id' => $this->payload['id'],
-                    'type'  => 'Follow',
-                    'actor' => $actor->permalink(),
-                    'object' => $target->permalink()
-                ]
+                'object'   => $payload
             ];
             Helpers::sendSignedObject($target, $actor->inbox_url, $accept);
         }