From 12e5dc4b595db4e1b6082d939db6780ee80c9faa Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Wed, 1 Aug 2018 18:01:34 +0100 Subject: [PATCH] Fix some Inbox Create Bugs --- actions/apactorinbox.php | 4 +--- actions/inbox/Create.php | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/actions/apactorinbox.php b/actions/apactorinbox.php index d95e753..45634d0 100755 --- a/actions/apactorinbox.php +++ b/actions/apactorinbox.php @@ -97,9 +97,7 @@ class apActorInboxAction extends ManagedAction 'as:Public' ]; - $to_profiles = [ActivityPubPlugin::actor_uri($profile), - 'https://www.w3.org/ns/activitystreams#Public' - ]; + $to_profiles = [$profile]; // Process request switch ($data->type) { diff --git a/actions/inbox/Create.php b/actions/inbox/Create.php index c3fb555..8af2755 100755 --- a/actions/inbox/Create.php +++ b/actions/inbox/Create.php @@ -76,14 +76,10 @@ if (isset($data->object->inReplyTo)) { $discovery = new Activitypub_explorer; -if ($to_profiles == ['https://www.w3.org/ns/activitystreams#Public']) { - $to_profiles = []; -} - // Generate Cc objects if (isset($data->object->cc) && is_array($data->object->cc)) { // Remove duplicates from Cc actors set - array_unique($data->object->to); + array_unique($data->object->cc); foreach ($data->object->cc as $cc_url) { try { $to_profiles = array_merge($to_profiles, $discovery->lookup($cc_url));