From b4880713d53ee130421cc2143da4e85bdca23830 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Tue, 31 Jul 2018 23:35:15 +0100 Subject: [PATCH] Fix Follow debug sequence --- actions/inbox/Follow.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actions/inbox/Follow.php b/actions/inbox/Follow.php index 5f42a03..3944370 100755 --- a/actions/inbox/Follow.php +++ b/actions/inbox/Follow.php @@ -47,9 +47,11 @@ try { try { if (!Subscription::exists($actor_profile, $object_profile)) { Subscription::start($actor_profile, $object_profile); + common_debug('ActivityPubPlugin: Accepted Follow request from '.$data->actor.' to '.$data->object); + + // Send Accept back $postman = new Activitypub_postman($actor_profile); $postman->send(json_encode(Activitypub_accept::accept_to_array(Activitypub_follow::follow_to_array($data->actor, $data->object))), $object_aprofile->getInbox()); - common_debug('ActivityPubPlugin: Accepted Follow request from '.$data->actor.' to '.$data->object); ActivityPubReturn::answer('', 202); } else { common_debug('ActivityPubPlugin: Received a repeated Follow request from '.$data->actor.' to '.$data->object);