diff --git a/ActivityPubPlugin.php b/ActivityPubPlugin.php index fb53c6b..6e517d7 100755 --- a/ActivityPubPlugin.php +++ b/ActivityPubPlugin.php @@ -139,7 +139,7 @@ class ActivityPubPlugin extends Plugin } try { return Activitypub_notice::create_notice( - ActivityPub_explorer::get_profile_from_url($res->attributedTo), + ActivityPub_explorer::get_profile_from_url($res['attributedTo']), $res->id, $res->url, $res->content, diff --git a/utils/explorer.php b/utils/explorer.php index c2ff051..f8baa32 100755 --- a/utils/explorer.php +++ b/utils/explorer.php @@ -60,7 +60,7 @@ class Activitypub_explorer $actor_profile = $discovery->lookup($url); return $actor_profile[0]; } catch (Exception $e) { - throw new Exception('Invalid Actor: '.$url); + throw new Exception('Invalid Actor.'); } unset($discovery); } @@ -77,7 +77,7 @@ class Activitypub_explorer public function lookup($url) { if (in_array($url, ACTIVITYPUB_PUBLIC_TO)) { - throw new Exception ('Empty Actor URL.'); + return []; } common_debug('ActivityPub Explorer: Started now looking for '.$url);