浏览代码

Update AP inbox

Daniel Supernault 6 年之前
父节点
当前提交
f680cb1fad
共有 1 个文件被更改,包括 3 次插入7 次删除
  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'
                     'item_type' => 'App\Profile'
                 ]);
                 ]);
             }
             }
-
+            $payload = $this->payload;
+            $payload = unset($payload['@context']);
             // send Accept to remote profile
             // send Accept to remote profile
             $accept = [
             $accept = [
                 '@context' => 'https://www.w3.org/ns/activitystreams',
                 '@context' => 'https://www.w3.org/ns/activitystreams',
                 'id'       => $target->permalink().'#accepts/follows/' . $follower->id,
                 'id'       => $target->permalink().'#accepts/follows/' . $follower->id,
                 'type'     => 'Accept',
                 'type'     => 'Accept',
                 'actor'    => $target->permalink(),
                 '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);
             Helpers::sendSignedObject($target, $actor->inbox_url, $accept);
         }
         }