Proper AP Notices (fixed #46)

Explorer now works both for local and remote URIs
Fixed various serious errors (most of them in Explorer
and some in AP Profiles)
This commit is contained in:
Diogo Cordeiro
2018-07-29 02:35:04 +01:00
parent 5c351efb06
commit edb3633bcd
16 changed files with 278 additions and 129 deletions

View File

@@ -168,12 +168,12 @@ class Activitypub_postman
public function create($notice)
{
$data = Activitypub_create::create_to_array(
$notice->getUri(),
$notice->getUrl(),
ActivityPubPlugin::actor_uri($this->actor),
Activitypub_notice::notice_to_array($notice)
array_merge(Activitypub_notice::notice_to_array($notice), ['cc' => common_local_url('apActorFollowers', ['id' => $this->actor->getID()]),])
);
if (isset($notice->reply_to)) {
$data["object"]["reply_to"] = $notice->getParent()->getUri();
$data["object"]["reply_to"] = $notice->getParent()->getUrl();
}
$this->client->setBody(json_encode($data));
foreach ($this->to_inbox() as $inbox) {