diff --git a/includes/functions.php b/includes/functions.php index 24ebea8..1abb9d1 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -118,6 +118,10 @@ function get_remote_metadata_by_actor( $actor ) { return null; } + if ( is_wp_error( $actor ) ) { + return $actor; + } + $metadata = \get_transient( 'activitypub_' . $actor ); if ( $metadata ) { diff --git a/integration/class-friends-feed-parser-activitypub.php b/integration/class-friends-feed-parser-activitypub.php index 294285a..981c9f4 100644 --- a/integration/class-friends-feed-parser-activitypub.php +++ b/integration/class-friends-feed-parser-activitypub.php @@ -68,7 +68,7 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser { */ public function update_feed_details( $feed_details ) { $meta = \Activitypub\get_remote_metadata_by_actor( $feed_details['url'] ); - if ( ! $meta && is_wp_error( $meta ) ) { + if ( ! $meta || is_wp_error( $meta ) ) { return $meta; }