Don't show the ActivityPub section if there is no ActivityPub feed

This commit is contained in:
Alex Kirk 2022-12-10 12:47:36 +01:00
parent b027d1a8d0
commit 995c6c714d

View file

@ -479,11 +479,16 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
}
public function activitypub_settings( \Friends\User $friend ) {
$has_activitypub_feed = false;
foreach ( $friend->get_active_feeds() as $feed ) {
if ( 'activitypub' === $feed->parser ) {
return;
if ( 'activitypub' === $feed->get_parser() ) {
$has_activitypub_feed = true;
}
}
if ( ! $has_activitypub_feed ) {
return;
}
$show_replies = $friend->get_user_option( 'activitypub_friends_show_replies' );
?>
<tr>